@yext/visual-editor 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{debugger-C-GK2f4q-7P5nIXek.cjs → debugger-C-GK2f4q-8oHFLsRA.cjs} +1 -1
- package/dist/{debugger-C-GK2f4q-CM9lUegF.js → debugger-C-GK2f4q-CXC-jEGs.js} +1 -1
- package/dist/index-DYLhnejE.cjs +297 -0
- package/dist/{index-CR1QI1Dd.js → index-gaSBBVcH.js} +46120 -45528
- package/dist/index.d.cts +261 -200
- package/dist/index.d.ts +261 -200
- package/dist/style.css +1 -1
- package/dist/visual-editor.cjs +1 -1
- package/dist/visual-editor.js +45 -37
- package/package.json +6 -4
- package/dist/index-B5wBZ4uV.cjs +0 -280
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
"use strict";var B1=Object.defineProperty;var W1=(e,t,n)=>t in e?B1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fl=(e,t,n)=>W1(e,typeof t!="symbol"?t+"":t,n);const H=require("react"),Mu=require("react-dom"),Gn=require("@measured/puck"),z1=require("uuid");function tE(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=tE(H),nE=tE(Mu),sr=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],rE=(e,t,n="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:n}),Wo=(e,t)=>{const[n,r]=H.useState("pending");return oE(e,t,H1(r)),{sendToParent:i=>{if(!window.parent)throw new Error("Parent window has closed");r("pending");for(const a of t)rE({...i,type:e},window.parent,a)},status:n}},ka=(e,t,n)=>{oE(e,t,(o,i,a)=>{const{type:l,payload:u}=o;l===e&&typeof n=="function"&&n(p=>rE({...p,type:e},a,i),u)})},oE=(e,t,n)=>{const[r,o]=H.useState(),[i,a]=H.useState(),l=H.useRef(),u=H.useRef();l.current=r,u.current=i;const p=H.useCallback(({origin:g,source:_,data:C})=>{var y;if((y=C==null?void 0:C.source)!=null&&y.startsWith("react-devtools")||!t.includes(g))return;const{type:b}=C;b===e&&(a(_),o(g),n(C,g,_))},[e,t,a,o,n]);H.useEffect(()=>(window.addEventListener("message",p),()=>window.removeEventListener("message",p)),[e,i,r,p])},H1=e=>(t,n,r)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")},G1=()=>{const[e,t]=H.useState();return ka("getEntityDocument",sr,(n,r)=>{t(r),n({status:"success",payload:{message:"getEntityDocument received"}})}),e},K1=()=>{const[e,t]=H.useState(void 0);return ka("getTemplateStream",sr,(n,r)=>{t(r.stream.schema.fields),n({status:"success",payload:{message:"templateStream received"}})}),ka("getDevEntityFields",sr,(n,r)=>{t(iE(r)),n({status:"success",payload:{message:"getDevEntityFields received"}})}),e},iE=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children?{fields:iE(t.children)}:{}})),aE=ge.createContext(void 0),sE=()=>{const e=ge.useContext(aE);if(!e)throw new Error("useEntityFields must be used within VisualEditorProvider");return e},Ag=ge.createContext(void 0),uo=()=>{const e=ge.useContext(Ag);if(!e)throw new Error("useDocument must be used within VisualEditorProvider");return e},Rg=ge.createContext(void 0),lE=()=>{const e=ge.useContext(Rg);if(!e)throw new Error("useTailwindConfig must be used within VisualEditorProvider");return e},U1=(e,t)=>{const n=V1(e);return t&&Object.entries(n).forEach(([r])=>{t[r]&&(n[r]=t[r])}),n},V1=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if("default"in i)t[`--${i.plugin}-${n}-${o}`]=typeof i.default=="number"?`${i.default}px`:i.default;else if("styles"in i)for(const a in i.styles)t[`--${i.plugin}-${n}-${o}-${a}`]=typeof i.styles[a].default=="number"?`${i.styles[a].default}px`:i.styles[a].default}}return t},Y1=(e,t,n)=>{const r={};for(const o in n.styles){const i=n.styles[o];if("default"in i)i.type==="number"?r[`--${i.plugin}-${t}-${o}`]=e[o]+"px":r[`--${i.plugin}-${t}-${o}`]=e[o];else for(const a in i.styles)i.styles[a].type==="number"?r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]+"px":r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]}return r},mi=class mi{constructor(t=!1){fl(this,"enable",t=>{mi.enabled=t,mi.enabled&&console.log("[DEBUG] xYextDebug enabled")});fl(this,"logData",(t,n)=>{mi.enabled&&console.log("[DEBUG]",t,"-",n)});fl(this,"logFunc",t=>{mi.enabled&&console.log("[DEBUG] -->",t,"called")});fl(this,"log",t=>{mi.enabled&&console.log("[DEBUG]",t)});mi.enabled=t,mi.enabled&&console.log("[DEBUG] xYextDebug enabled")}};fl(mi,"enabled");let Kr=mi;const $g={Alegreya:{italics:!0,minWeight:400,maxWeight:900,fallback:"serif"},Asap:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},Bitter:{italics:!0,minWeight:100,maxWeight:900,fallback:"serif"},Cabin:{italics:!0,minWeight:400,maxWeight:700,fallback:"sans-serif"},Cinzel:{italics:!1,minWeight:400,maxWeight:900,fallback:"serif"},"EB Garamond":{italics:!0,minWeight:400,maxWeight:800,fallback:"serif"},"Exo 2":{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},Inconsolata:{italics:!1,minWeight:200,maxWeight:900,fallback:"sans-serif"},"Josefin Sans":{italics:!0,minWeight:100,maxWeight:700,fallback:"sans-serif"},Lora:{italics:!0,minWeight:400,maxWeight:700,fallback:"serif"},Montserrat:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Open Sans":{italics:!0,minWeight:300,maxWeight:800,fallback:"sans-serif"},"Playfair Display":{italics:!0,minWeight:400,maxWeight:900,fallback:"serif"},Raleway:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Roboto Flex":{italics:!1,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Roboto Slab":{italics:!1,minWeight:100,maxWeight:900,fallback:"serif"},"Source Code Pro":{italics:!0,minWeight:200,maxWeight:900,fallback:"monospace"},"Source Sans 3":{italics:!0,minWeight:200,maxWeight:900,fallback:"sans-serif"},"Ubuntu Sans":{italics:!0,minWeight:100,maxWeight:800,fallback:"sans-serif"}},q1=e=>{const t=[];for(const n in e){const r=e[n];t.push({label:n,value:`'${n}', ${r.fallback}`})}return t},Z1=e=>{const t=`<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
2
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
3
|
+
<link href="https://fonts.googleapis.com/css2?`,n='display=swap" rel="stylesheet">';let r="";for(const o in e){const i=e[o],a=i.italics?":ital,wght@":":wght@",l=`${i.minWeight}..${i.maxWeight}`,u=i.italics?`0,${l};1,${l}`:l;r+="family="+o.replaceAll(" ","+")+a+u+"&"}return t+r+n},J1=Z1($g),Lp=[{label:"Thin",value:"100"},{label:"Extralight",value:"200"},{label:"Light",value:"300"},{label:"Normal",value:"400"},{label:"Medium",value:"500"},{label:"Semibold",value:"600"},{label:"Bold",value:"700"},{label:"Extrabold",value:"800"},{label:"Black",value:"900"}],X1=e=>{var i;const{fontCssVariable:t,weightOptions:n=Lp}=e;if(!t||typeof window>"u")return n;const r=document.getElementById(kg),o=(i=r==null?void 0:r.contentDocument)==null?void 0:i.getElementById("visual-editor-theme");return o?cE(o,e):Lp},Jl=async e=>new Promise(t=>{const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById(kg).contentDocument)==null?void 0:i.getElementById(Dg);if(o){n.disconnect();const a=cE(o,e);t([{label:"Default",value:"default"},...a])}});n.observe(document,{childList:!0,subtree:!0})}),cE=(e,{fontCssVariable:t,weightOptions:n=Lp,fontList:r=$g})=>{var l;const o=e.textContent||e.innerHTML,i=new RegExp(`${t}:\\s*(['"]?([^',\\s]+(?:\\s+[^',\\s]+)*)['"]?)(?:,|\\s|;|$)`,"i"),a=(l=o.match(i))==null?void 0:l[2];return!a||!r[a]?n:n.filter(u=>Number(u.value)<=r[a].maxWeight&&Number(u.value)>=r[a].minWeight)},Dg="visual-editor-theme",kg="preview-frame",rf=new Kr,Q1=(e,t,n)=>{var a,l;rf.logFunc("applyTheme");const r=(a=e==null?void 0:e._site)==null?void 0:a.pagesTheme;let o;(r==null?void 0:r.length)>0&&(o=e.siteId!==0?r.find(u=>Number(u.themeConfiguration.siteId)===e.siteId):r[0]);let i;return o!=null&&o.themeConfiguration&&(i=JSON.parse((l=o.themeConfiguration)==null?void 0:l.data)),Object.keys(t).length>0?`${n??""}${J1}<style id="${Dg}" type="text/css">${uE(i,t)}</style>`:n??""},uE=(e,t)=>{rf.logFunc("internalApplyTheme");const n=U1(t,e);return!n||Object.keys(n).length===0?"":(rf.logData("THEME_VALUES_TO_APPLY",n),".components{"+Object.entries(n).map(([r,o])=>`${r}:${o} !important`).join(";")+"}")},Nu=async(e,t)=>{rf.logFunc("updateThemeInEditor");const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById(kg).contentDocument)==null?void 0:i.getElementById(Dg);o&&(n.disconnect(),o.innerText=uE(e,t))});n.observe(document,{childList:!0,subtree:!0})},Fp=JSON.stringify({root:{},content:[],zones:{}});function eO(e,t){var g,_,C,b;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:n}=e,r=n==null?void 0:n.siteId,o=n.visualConfigurations??[],i=n.pageLayouts??[],a=(g=n._site)==null?void 0:g.defaultLayouts;let l;for(const y of o)if(y.pageSet===t&&(!r||Number(y.siteId)===r)){l=JSON.parse($h(y.data,t));break}if(!l){for(const y of i)if(((_=y.visualConfiguration)==null?void 0:_.pageSet)===t&&(!r||Number(y.visualConfiguration.siteId)===r)){l=JSON.parse($h(y.visualConfiguration.data,t));break}}if(!l&&a){for(const y of a)if(((C=y.visualConfiguration)==null?void 0:C.pageSet)===t&&(!r||Number(y.visualConfiguration.siteId)===r)){l=JSON.parse($h(y.visualConfiguration.data,t));break}}l||(console.warn(`Unable to find puck data for pageSet: ${t}`),l=JSON.parse(Fp));const u=e;u.document.visualTemplate=l;const p=(b=n._customDataOverrides)==null?void 0:b.pagesTheme;return p&&(u.document._site?u.document._site.pagesTheme=p:u.document._site={pagesTheme:p}),u}function $h(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Fp;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Fp}return e}const $r=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled||!t.field)return t.constantValue;try{const n=t.field.split(".");let r=!1,o=e;for(let i=0;i<n.length;i++)if((o==null?void 0:o[n[i]])!==void 0)o=o[n[i]];else{r=!0;break}if(!r)return o}catch(n){console.error("Error in resolveYextEntityField:",n)}console.warn(`The field ${t.field} was not found in the document.`)}},tO=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if(t[i.plugin]||(t[i.plugin]={}),"default"in i)t[i.plugin][`${n}-${o}`]=`var(--${i.plugin}-${n}-${o})`;else if("styles"in i){const a={};for(const l in i.styles)a[l]=`var(--${i.plugin}-${n}-${o}-${l})`;t[i.plugin][`${n}-${o}`]=a}}}return t},dE=(e,t)=>{const n={...t};for(const r in e)if(r in e){const o=e[r],i=n[r];Wy(o)&&Wy(i)?n[r]=dE(o,i):(o&&i&&console.warn(`Both theme.config.ts and tailwind.config.ts provided a value for ${r}. Using the value from theme.config.ts (${i})`),n[r]=i??o)}return n},Wy=e=>e!==null&&typeof e=="object",nO=(e,t)=>{const n=tO(t);return dE(e,n)};function fE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=fE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fE(e))&&(r&&(r+=" "),r+=t);return r}const Mg="-",rO=e=>{const t=iO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(Mg);return l[0]===""&&l.length!==1&&l.shift(),hE(l,t)||oO(a)},getConflictingClassGroupIds:(a,l)=>{const u=n[a]||[];return l&&r[a]?[...u,...r[a]]:u}}},hE=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?hE(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Mg);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId},zy=/^\[(.+)\]$/,oO=e=>{if(zy.test(e)){const t=zy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return sO(Object.entries(e.classGroups),n).forEach(([i,a])=>{jp(a,r,i,t)}),r},jp=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Hy(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(aO(o)){jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{jp(a,Hy(t,i),n,r)})})},Hy=(e,t)=>{let n=e;return t.split(Mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},aO=e=>e.isThemeGetter,sO=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[n,o]}):e,lO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},pE="!",cO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=l=>{const u=[];let p=0,g=0,_;for(let T=0;T<l.length;T++){let O=l[T];if(p===0){if(O===o&&(r||l.slice(T,T+i)===t)){u.push(l.slice(g,T)),g=T+i;continue}if(O==="/"){_=T;continue}}O==="["?p++:O==="]"&&p--}const C=u.length===0?l:l.substring(g),b=C.startsWith(pE),y=b?C.substring(1):C,v=_&&_>g?_-g:void 0;return{modifiers:u,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:a}):a},uO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},dO=e=>({cache:lO(e.cacheSize),parseClassName:cO(e),...rO(e)}),fO=/\s+/,hO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(fO);let l="";for(let u=a.length-1;u>=0;u-=1){const p=a[u],{modifiers:g,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:b}=n(p);let y=!!b,v=r(y?C.substring(0,b):C);if(!v){if(!y){l=p+(l.length>0?" "+l:l);continue}if(v=r(C),!v){l=p+(l.length>0?" "+l:l);continue}y=!1}const T=uO(g).join(":"),O=_?T+pE:T,R=O+v;if(i.includes(R))continue;i.push(R);const k=o(v,y);for(let P=0;P<k.length;++P){const M=k[P];i.push(O+M)}l=p+(l.length>0?" "+l:l)}return l};function pO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gE(t))&&(r&&(r+=" "),r+=n);return r}const gE=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gE(e[r]))&&(n&&(n+=" "),n+=t);return n};function gO(e,...t){let n,r,o,i=a;function a(u){const p=t.reduce((g,_)=>_(g),e());return n=dO(p),r=n.cache.get,o=n.cache.set,i=l,l(u)}function l(u){const p=r(u);if(p)return p;const g=hO(u,n);return o(u,g),g}return function(){return i(pO.apply(null,arguments))}}const Tn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},mE=/^\[(?:([a-z-]+):)?(.+)\]$/i,mO=/^\d+\/\d+$/,yO=new Set(["px","full","screen"]),vO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_O=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,xO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,EO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=e=>jl(e)||yO.has(e)||mO.test(e),Ta=e=>Xl(e,"length",RO),jl=e=>!!e&&!Number.isNaN(Number(e)),Dh=e=>Xl(e,"number",jl),nu=e=>!!e&&Number.isInteger(Number(e)),CO=e=>e.endsWith("%")&&jl(e.slice(0,-1)),qt=e=>mE.test(e),Na=e=>vO.test(e),wO=new Set(["length","size","percentage"]),TO=e=>Xl(e,wO,yE),NO=e=>Xl(e,"position",yE),SO=new Set(["image","url"]),OO=e=>Xl(e,SO,DO),AO=e=>Xl(e,"",$O),ru=()=>!0,Xl=(e,t,n)=>{const r=mE.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},RO=e=>bO.test(e)&&!_O.test(e),yE=()=>!1,$O=e=>xO.test(e),DO=e=>EO.test(e),kO=()=>{const e=Tn("colors"),t=Tn("spacing"),n=Tn("blur"),r=Tn("brightness"),o=Tn("borderColor"),i=Tn("borderRadius"),a=Tn("borderSpacing"),l=Tn("borderWidth"),u=Tn("contrast"),p=Tn("grayscale"),g=Tn("hueRotate"),_=Tn("invert"),C=Tn("gap"),b=Tn("gradientColorStops"),y=Tn("gradientColorStopPositions"),v=Tn("inset"),T=Tn("margin"),O=Tn("opacity"),R=Tn("padding"),k=Tn("saturate"),P=Tn("scale"),M=Tn("sepia"),Y=Tn("skew"),X=Tn("space"),oe=Tn("translate"),Z=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",qt,t],de=()=>[qt,t],pe=()=>["",zi,Ta],te=()=>["auto",jl,qt],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",qt],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[jl,qt];return{cacheSize:500,separator:":",theme:{colors:[ru],spacing:[zi,Ta],blur:["none","",Na,qt],brightness:W(),borderColor:[e],borderRadius:["none","","full",Na,qt],borderSpacing:de(),borderWidth:pe(),contrast:W(),grayscale:ne(),hueRotate:W(),invert:ne(),gap:de(),gradientColorStops:[e],gradientColorStopPositions:[CO,Ta],inset:Q(),margin:Q(),opacity:W(),padding:de(),saturate:W(),scale:W(),sepia:ne(),skew:W(),space:de(),translate:de()},classGroups:{aspect:[{aspect:["auto","square","video",qt]}],container:["container"],columns:[{columns:[Na]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...fe(),qt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nu,qt]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qt]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",nu,qt]}],"grid-cols":[{"grid-cols":[ru]}],"col-start-end":[{col:["auto",{span:["full",nu,qt]},qt]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[ru]}],"row-start-end":[{row:["auto",{span:[nu,qt]},qt]}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qt]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],ms:[{ms:[T]}],me:[{me:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qt,t]}],"min-w":[{"min-w":[qt,t,"min","max","fit"]}],"max-w":[{"max-w":[qt,t,"none","full","min","max","fit","prose",{screen:[Na]},Na]}],h:[{h:[qt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Na,Ta]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Dh]}],"font-family":[{font:[ru]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qt]}],"line-clamp":[{"line-clamp":["none",jl,Dh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zi,qt]}],"list-image":[{"list-image":["none",qt]}],"list-style-type":[{list:["none","disc","decimal",qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zi,Ta]}],"underline-offset":[{"underline-offset":["auto",zi,qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:de()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),NO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",TO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},OO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[zi,qt]}],"outline-w":[{outline:[zi,Ta]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[zi,Ta]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Na,AO]}],"shadow-color":[{shadow:[ru]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Na,qt]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[_]}],saturate:[{saturate:[k]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qt]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",qt]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[nu,qt]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[Y]}],"skew-y":[{"skew-y":[Y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":de()}],"scroll-mx":[{"scroll-mx":de()}],"scroll-my":[{"scroll-my":de()}],"scroll-ms":[{"scroll-ms":de()}],"scroll-me":[{"scroll-me":de()}],"scroll-mt":[{"scroll-mt":de()}],"scroll-mr":[{"scroll-mr":de()}],"scroll-mb":[{"scroll-mb":de()}],"scroll-ml":[{"scroll-ml":de()}],"scroll-p":[{"scroll-p":de()}],"scroll-px":[{"scroll-px":de()}],"scroll-py":[{"scroll-py":de()}],"scroll-ps":[{"scroll-ps":de()}],"scroll-pe":[{"scroll-pe":de()}],"scroll-pt":[{"scroll-pt":de()}],"scroll-pr":[{"scroll-pr":de()}],"scroll-pb":[{"scroll-pb":de()}],"scroll-pl":[{"scroll-pl":de()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[zi,Ta,Dh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},MO=gO(kO);function cn(...e){return MO(Nf(e))}var Td=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function PO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bp={exports:{}},ou={};/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.min.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var Gy;function IO(){if(Gy)return ou;Gy=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var g,_={},C=null,b=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(b=u.ref);for(g in u)r.call(u,g)&&!i.hasOwnProperty(g)&&(_[g]=u[g]);if(l&&l.defaultProps)for(g in u=l.defaultProps,u)_[g]===void 0&&(_[g]=u[g]);return{$$typeof:t,type:l,key:C,ref:b,props:_,_owner:o.current}}return ou.Fragment=n,ou.jsx=a,ou.jsxs=a,ou}var iu={};/**
|
|
12
|
+
* @license React
|
|
13
|
+
* react-jsx-runtime.development.js
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/var Ky;function LO(){return Ky||(Ky=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function T(ae){if(ae===null||typeof ae!="object")return null;var $e=y&&ae[y]||ae[v];return typeof $e=="function"?$e:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(ae){{for(var $e=arguments.length,je=new Array($e>1?$e-1:0),at=1;at<$e;at++)je[at-1]=arguments[at];k("error",ae,je)}}function k(ae,$e,je){{var at=O.ReactDebugCurrentFrame,xt=at.getStackAddendum();xt!==""&&($e+="%s",je=je.concat([xt]));var bt=je.map(function(ht){return String(ht)});bt.unshift("Warning: "+$e),Function.prototype.apply.call(console[ae],console,bt)}}var P=!1,M=!1,Y=!1,X=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function U(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||oe||ae===o||ae===p||ae===g||X||ae===b||P||M||Y||typeof ae=="object"&&ae!==null&&(ae.$$typeof===C||ae.$$typeof===_||ae.$$typeof===a||ae.$$typeof===l||ae.$$typeof===u||ae.$$typeof===Z||ae.getModuleId!==void 0))}function Q(ae,$e,je){var at=ae.displayName;if(at)return at;var xt=$e.displayName||$e.name||"";return xt!==""?je+"("+xt+")":je}function de(ae){return ae.displayName||"Context"}function pe(ae){if(ae==null)return null;if(typeof ae.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ae=="function")return ae.displayName||ae.name||null;if(typeof ae=="string")return ae;switch(ae){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case g:return"SuspenseList"}if(typeof ae=="object")switch(ae.$$typeof){case l:var $e=ae;return de($e)+".Consumer";case a:var je=ae;return de(je._context)+".Provider";case u:return Q(ae,ae.render,"ForwardRef");case _:var at=ae.displayName||null;return at!==null?at:pe(ae.type)||"Memo";case C:{var xt=ae,bt=xt._payload,ht=xt._init;try{return pe(ht(bt))}catch{return null}}}return null}var te=Object.assign,fe=0,V,j,ee,ne,B,W,J;function F(){}F.__reactDisabledLog=!0;function w(){{if(fe===0){V=console.log,j=console.info,ee=console.warn,ne=console.error,B=console.group,W=console.groupCollapsed,J=console.groupEnd;var ae={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:ae,log:ae,warn:ae,error:ae,group:ae,groupCollapsed:ae,groupEnd:ae})}fe++}}function N(){{if(fe--,fe===0){var ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},ae,{value:V}),info:te({},ae,{value:j}),warn:te({},ae,{value:ee}),error:te({},ae,{value:ne}),group:te({},ae,{value:B}),groupCollapsed:te({},ae,{value:W}),groupEnd:te({},ae,{value:J})})}fe<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(ae,$e,je){{if(q===void 0)try{throw Error()}catch(xt){var at=xt.stack.trim().match(/\n( *(at )?)/);q=at&&at[1]||""}return`
|
|
20
|
+
`+q+ae}}var he=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(ae,$e){if(!ae||he)return"";{var je=se.get(ae);if(je!==void 0)return je}var at;he=!0;var xt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=I.current,I.current=null,w();try{if($e){var ht=function(){throw Error()};if(Object.defineProperty(ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ht,[])}catch(Zn){at=Zn}Reflect.construct(ae,[],ht)}else{try{ht.call()}catch(Zn){at=Zn}ae.call(ht.prototype)}}else{try{throw Error()}catch(Zn){at=Zn}ae()}}catch(Zn){if(Zn&&at&&typeof Zn.stack=="string"){for(var At=Zn.stack.split(`
|
|
21
|
+
`),Ut=at.stack.split(`
|
|
22
|
+
`),Mt=At.length-1,Yt=Ut.length-1;Mt>=1&&Yt>=0&&At[Mt]!==Ut[Yt];)Yt--;for(;Mt>=1&&Yt>=0;Mt--,Yt--)if(At[Mt]!==Ut[Yt]){if(Mt!==1||Yt!==1)do if(Mt--,Yt--,Yt<0||At[Mt]!==Ut[Yt]){var yn=`
|
|
23
|
+
`+At[Mt].replace(" at new "," at ");return ae.displayName&&yn.includes("<anonymous>")&&(yn=yn.replace("<anonymous>",ae.displayName)),typeof ae=="function"&&se.set(ae,yn),yn}while(Mt>=1&&Yt>=0);break}}}finally{he=!1,I.current=bt,N(),Error.prepareStackTrace=xt}var _r=ae?ae.displayName||ae.name:"",wn=_r?ue(_r):"";return typeof ae=="function"&&se.set(ae,wn),wn}function Be(ae,$e,je){return Oe(ae,!1)}function ce(ae){var $e=ae.prototype;return!!($e&&$e.isReactComponent)}function le(ae,$e,je){if(ae==null)return"";if(typeof ae=="function")return Oe(ae,ce(ae));if(typeof ae=="string")return ue(ae);switch(ae){case p:return ue("Suspense");case g:return ue("SuspenseList")}if(typeof ae=="object")switch(ae.$$typeof){case u:return Be(ae.render);case _:return le(ae.type,$e,je);case C:{var at=ae,xt=at._payload,bt=at._init;try{return le(bt(xt),$e,je)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Pe.setExtraStackFrame(je)}else Pe.setExtraStackFrame(null)}function Xe(ae,$e,je,at,xt){{var bt=Function.call.bind(ve);for(var ht in ae)if(bt(ae,ht)){var At=void 0;try{if(typeof ae[ht]!="function"){var Ut=Error((at||"React class")+": "+je+" type `"+ht+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ae[ht]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ut.name="Invariant Violation",Ut}At=ae[ht]($e,ht,at,je,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Mt){At=Mt}At&&!(At instanceof Error)&&(We(xt),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",at||"React class",je,ht,typeof At),We(null)),At instanceof Error&&!(At.message in Me)&&(Me[At.message]=!0,We(xt),R("Failed %s type: %s",je,At.message),We(null))}}}var st=Array.isArray;function dt(ae){return st(ae)}function Ct(ae){{var $e=typeof Symbol=="function"&&Symbol.toStringTag,je=$e&&ae[Symbol.toStringTag]||ae.constructor.name||"Object";return je}}function Se(ae){try{return me(ae),!1}catch{return!0}}function me(ae){return""+ae}function _e(ae){if(Se(ae))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(ae)),me(ae)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(ae){if(ve.call(ae,"ref")){var $e=Object.getOwnPropertyDescriptor(ae,"ref").get;if($e&&$e.isReactWarning)return!1}return ae.ref!==void 0}function Et(ae){if(ve.call(ae,"key")){var $e=Object.getOwnPropertyDescriptor(ae,"key").get;if($e&&$e.isReactWarning)return!1}return ae.key!==void 0}function Bt(ae,$e){if(typeof ae.ref=="string"&&De.current&&$e&&De.current.stateNode!==$e){var je=pe(De.current.type);tt[je]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),ae.ref),tt[je]=!0)}}function Qe(ae,$e){{var je=function(){ke||(ke=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"key",{get:je,configurable:!0})}}function et(ae,$e){{var je=function(){ze||(ze=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"ref",{get:je,configurable:!0})}}var lt=function(ae,$e,je,at,xt,bt,ht){var At={$$typeof:t,type:ae,key:$e,ref:je,props:ht,_owner:bt};return At._store={},Object.defineProperty(At._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(At,"_self",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.defineProperty(At,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xt}),Object.freeze&&(Object.freeze(At.props),Object.freeze(At)),At};function wt(ae,$e,je,at,xt){{var bt,ht={},At=null,Ut=null;je!==void 0&&(_e(je),At=""+je),Et($e)&&(_e($e.key),At=""+$e.key),ut($e)&&(Ut=$e.ref,Bt($e,xt));for(bt in $e)ve.call($e,bt)&&!Fe.hasOwnProperty(bt)&&(ht[bt]=$e[bt]);if(ae&&ae.defaultProps){var Mt=ae.defaultProps;for(bt in Mt)ht[bt]===void 0&&(ht[bt]=Mt[bt])}if(At||Ut){var Yt=typeof ae=="function"?ae.displayName||ae.name||"Unknown":ae;At&&Qe(ht,Yt),Ut&&et(ht,Yt)}return lt(ae,At,Ut,xt,at,De.current,ht)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Rt.setExtraStackFrame(je)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function yt(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function kt(){{if(_t.current){var ae=pe(_t.current.type);if(ae)return`
|
|
24
|
+
|
|
25
|
+
Check the render method of \``+ae+"`."}return""}}function Dt(ae){return""}var Kt={};function sn(ae){{var $e=kt();if(!$e){var je=typeof ae=="string"?ae:ae.displayName||ae.name;je&&($e=`
|
|
26
|
+
|
|
27
|
+
Check the top-level render call using <`+je+">.")}return $e}}function ur(ae,$e){{if(!ae._store||ae._store.validated||ae.key!=null)return;ae._store.validated=!0;var je=sn($e);if(Kt[je])return;Kt[je]=!0;var at="";ae&&ae._owner&&ae._owner!==_t.current&&(at=" It was passed a child from "+pe(ae._owner.type)+"."),qe(ae),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',je,at),qe(null)}}function Er(ae,$e){{if(typeof ae!="object")return;if(dt(ae))for(var je=0;je<ae.length;je++){var at=ae[je];yt(at)&&ur(at,$e)}else if(yt(ae))ae._store&&(ae._store.validated=!0);else if(ae){var xt=T(ae);if(typeof xt=="function"&&xt!==ae.entries)for(var bt=xt.call(ae),ht;!(ht=bt.next()).done;)yt(ht.value)&&ur(ht.value,$e)}}}function Jo(ae){{var $e=ae.type;if($e==null||typeof $e=="string")return;var je;if(typeof $e=="function")je=$e.propTypes;else if(typeof $e=="object"&&($e.$$typeof===u||$e.$$typeof===_))je=$e.propTypes;else return;if(je){var at=pe($e);Xe(je,ae.props,"prop",at,ae)}else if($e.PropTypes!==void 0&&!ot){ot=!0;var xt=pe($e);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof $e.getDefaultProps=="function"&&!$e.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(ae){{for(var $e=Object.keys(ae.props),je=0;je<$e.length;je++){var at=$e[je];if(at!=="children"&&at!=="key"){qe(ae),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",at),qe(null);break}}ae.ref!==null&&(qe(ae),R("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}var Cr={};function qn(ae,$e,je,at,xt,bt){{var ht=U(ae);if(!ht){var At="";(ae===void 0||typeof ae=="object"&&ae!==null&&Object.keys(ae).length===0)&&(At+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ut=Dt();Ut?At+=Ut:At+=kt();var Mt;ae===null?Mt="null":dt(ae)?Mt="array":ae!==void 0&&ae.$$typeof===t?(Mt="<"+(pe(ae.type)||"Unknown")+" />",At=" Did you accidentally export a JSX literal instead of a component?"):Mt=typeof ae,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Mt,At)}var Yt=wt(ae,$e,je,xt,bt);if(Yt==null)return Yt;if(ht){var yn=$e.children;if(yn!==void 0)if(at)if(dt(yn)){for(var _r=0;_r<yn.length;_r++)Er(yn[_r],ae);Object.freeze&&Object.freeze(yn)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Er(yn,ae)}if(ve.call($e,"key")){var wn=pe(ae),Zn=Object.keys($e).filter(function(Xo){return Xo!=="key"}),Mr=Zn.length>0?"{key: someKey, "+Zn.join(": ..., ")+": ...}":"{key: someKey}";if(!Cr[wn+Mr]){var ia=Zn.length>0?"{"+Zn.join(": ..., ")+": ...}":"{}";R(`A props object containing a "key" prop is being spread into JSX:
|
|
28
|
+
let props = %s;
|
|
29
|
+
<%s {...props} />
|
|
30
|
+
React keys must be passed directly to JSX without using spread:
|
|
31
|
+
let props = %s;
|
|
32
|
+
<%s key={someKey} {...props} />`,Mr,wn,ia,wn),Cr[wn+Mr]=!0}}return ae===r?ra(Yt):Jo(Yt),Yt}}function br(ae,$e,je){return qn(ae,$e,je,!0)}function fo(ae,$e,je){return qn(ae,$e,je,!1)}var oa=fo,Ee=br;iu.Fragment=r,iu.jsx=oa,iu.jsxs=Ee}()),iu}process.env.NODE_ENV==="production"?Bp.exports=IO():Bp.exports=LO();var re=Bp.exports;const FO=({document:e,entityFields:t,tailwindConfig:n,children:r})=>re.jsx(Ag.Provider,{value:e,children:re.jsx(aE.Provider,{value:t,children:re.jsx(Rg.Provider,{value:n,children:r})})});function Sf(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];function p(_){const{scope:C,children:b,...y}=_,v=(C==null?void 0:C[e][u])||l,T=ge.useMemo(()=>y,Object.values(y));return re.jsx(v.Provider,{value:T,children:b})}function g(_,C){const b=(C==null?void 0:C[e][u])||l,y=ge.useContext(b);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${_}\` must be used within \`${i}\``)}return p.displayName=i+"Provider",[p,g]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,jO(o,...t)]}function jO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const _=u(i)[`__scope${p}`];return{...l,..._}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function BO(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function vE(...e){return t=>e.forEach(n=>BO(n,t))}function lr(...e){return ge.useCallback(vE(...e),e)}var Pa=ge.forwardRef((e,t)=>{const{children:n,...r}=e,o=ge.Children.toArray(n),i=o.find(WO);if(i){const a=i.props.children,l=o.map(u=>u===i?ge.Children.count(a)>1?ge.Children.only(null):ge.isValidElement(a)?a.props.children:null:u);return re.jsx(Wp,{...r,ref:t,children:ge.isValidElement(a)?ge.cloneElement(a,void 0,l):null})}return re.jsx(Wp,{...r,ref:t,children:n})});Pa.displayName="Slot";var Wp=ge.forwardRef((e,t)=>{const{children:n,...r}=e;if(ge.isValidElement(n)){const o=HO(n);return ge.cloneElement(n,{...zO(r,n.props),ref:t?vE(t,o):o})}return ge.Children.count(n)>1?ge.Children.only(null):null});Wp.displayName="SlotClone";var Pg=({children:e})=>re.jsx(re.Fragment,{children:e});function WO(e){return ge.isValidElement(e)&&e.type===Pg}function zO(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function HO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var GO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],kn=GO.reduce((e,t)=>{const n=ge.forwardRef((r,o)=>{const{asChild:i,...a}=r,l=i?Pa:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),re.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function KO(e,t){e&&nE.flushSync(()=>e.dispatchEvent(t))}var Ig="Progress",Lg=100,[UO,PJ]=Sf(Ig),[VO,YO]=UO(Ig),bE=ge.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=qO,...a}=e;(o||o===0)&&!Uy(o)&&console.error(ZO(`${o}`,"Progress"));const l=Uy(o)?o:Lg;r!==null&&!Vy(r,l)&&console.error(JO(`${r}`,"Progress"));const u=Vy(r,l)?r:null,p=of(u)?i(u,l):void 0;return re.jsx(VO,{scope:n,value:u,max:l,children:re.jsx(kn.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":of(u)?u:void 0,"aria-valuetext":p,role:"progressbar","data-state":EE(u,l),"data-value":u??void 0,"data-max":l,...a,ref:t})})});bE.displayName=Ig;var _E="ProgressIndicator",xE=ge.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=YO(_E,n);return re.jsx(kn.div,{"data-state":EE(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});xE.displayName=_E;function qO(e,t){return`${Math.round(e/t*100)}%`}function EE(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function of(e){return typeof e=="number"}function Uy(e){return of(e)&&!isNaN(e)&&e>0}function Vy(e,t){return of(e)&&!isNaN(e)&&e<=t&&e>=0}function ZO(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Lg}\`.`}function JO(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
33
|
+
- a positive number
|
|
34
|
+
- less than the value passed to \`max\` (or ${Lg} if no \`max\` prop is set)
|
|
35
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
36
|
+
|
|
37
|
+
Defaulting to \`null\`.`}var CE=bE,XO=xE;const wE=ge.forwardRef(({className:e,value:t,...n},r)=>re.jsx(CE,{ref:r,className:cn("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...n,children:re.jsx(XO,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));wE.displayName=CE.displayName;function Fg({progress:e}){return re.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[re.jsx(wE,{className:"ve-w-1/3 ve-loading-progress",value:e}),re.jsx("div",{children:"Loading Visual Editor..."})]})}var Yy=["light","dark"],QO="(prefers-color-scheme: dark)",eA=ge.createContext(void 0),tA={setTheme:e=>{},themes:[]},nA=()=>{var e;return(e=ge.useContext(eA))!=null?e:tA};ge.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,attrs:l,nonce:u})=>{let p=i==="system",g=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,_=o?Yy.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",C=(y,v=!1,T=!0)=>{let O=a?a[y]:y,R=v?y+"|| ''":`'${O}'`,k="";return o&&T&&!v&&Yy.includes(y)&&(k+=`d.style.colorScheme = '${y}';`),n==="class"?v||O?k+=`c.add(${R})`:k+="null":O&&(k+=`d[s](n,${R})`),k},b=e?`!function(){${g}${C(e)}}()`:r?`!function(){try{${g}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${p})){var t='${QO}',m=window.matchMedia(t);if(m.media!==t||m.matches){${C("dark")}}else{${C("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}${p?"":"else{"+C(i,!1,!1)+"}"}${_}}catch(e){}}()`:`!function(){try{${g}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}else{${C(i,!1,!1)};}${_}}catch(t){}}();`;return ge.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:b}})});var rA=e=>{switch(e){case"success":return aA;case"info":return lA;case"warning":return sA;case"error":return cA;default:return null}},oA=Array(12).fill(0),iA=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},oA.map((n,r)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),aA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),sA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),lA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),uA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dA=()=>{let[e,t]=H.useState(document.hidden);return H.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},zp=1,fA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:zp++,i=this.toasts.find(l=>l.id===o),a=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,a=r.then(async u=>{if(i=["resolve",u],H.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(pA(u)&&!u.ok){o=!1;let p=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,g=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:p,description:g})}else if(t.success!==void 0){o=!1;let p=typeof t.success=="function"?await t.success(u):t.success,g=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:p,description:g})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){o=!1;let p=typeof t.error=="function"?await t.error(u):t.error,g=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:p,description:g})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),l=()=>new Promise((u,p)=>a.then(()=>i[0]==="reject"?p(i[1]):u(i[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||zp++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},ro=new fA,hA=(e,t)=>{let n=(t==null?void 0:t.id)||zp++;return ro.addToast({title:e,...t,id:n}),n},pA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gA=hA,mA=()=>ro.toasts;Object.assign(gA,{success:ro.success,info:ro.info,warning:ro.warning,error:ro.error,custom:ro.custom,message:ro.message,promise:ro.promise,dismiss:ro.dismiss,loading:ro.loading},{getHistory:mA});function yA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}yA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
38
|
+
`);function Nd(e){return e.label!==void 0}var vA=3,bA="32px",qy=4e3,_A=356,xA=14,EA=20,CA=200;function wA(...e){return e.filter(Boolean).join(" ")}var TA=e=>{var t,n,r,o,i,a,l,u,p,g,_;let{invert:C,toast:b,unstyled:y,interacting:v,setHeights:T,visibleToasts:O,heights:R,index:k,toasts:P,expanded:M,removeToast:Y,defaultRichColors:X,closeButton:oe,style:Z,cancelButtonStyle:U,actionButtonStyle:Q,className:de="",descriptionClassName:pe="",duration:te,position:fe,gap:V,loadingIcon:j,expandByDefault:ee,classNames:ne,icons:B,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:J,cn:F}=e,[w,N]=H.useState(!1),[I,q]=H.useState(!1),[ue,he]=H.useState(!1),[se,Ce]=H.useState(!1),[Oe,Be]=H.useState(!1),[ce,le]=H.useState(0),[ve,Me]=H.useState(0),Pe=H.useRef(b.duration||te||qy),We=H.useRef(null),Xe=H.useRef(null),st=k===0,dt=k+1<=O,Ct=b.type,Se=b.dismissible!==!1,me=b.className||"",_e=b.descriptionClassName||"",De=H.useMemo(()=>R.findIndex(qe=>qe.toastId===b.id)||0,[R,b.id]),Fe=H.useMemo(()=>{var qe;return(qe=b.closeButton)!=null?qe:oe},[b.closeButton,oe]);H.useMemo(()=>b.duration||te||qy,[b.duration,te]);let ke=H.useRef(0),ze=H.useRef(0),tt=H.useRef(0),ut=H.useRef(null),[Et,Bt]=fe.split("-"),Qe=H.useMemo(()=>R.reduce((qe,ot,yt)=>yt>=De?qe:qe+ot.height,0),[R,De]),et=dA(),lt=b.invert||C,wt=Ct==="loading";ze.current=H.useMemo(()=>De*V+Qe,[De,Qe]),H.useEffect(()=>{N(!0)},[]),H.useEffect(()=>{let qe=Xe.current;if(qe){let ot=qe.getBoundingClientRect().height;return Me(ot),T(yt=>[{toastId:b.id,height:ot,position:b.position},...yt]),()=>T(yt=>yt.filter(kt=>kt.toastId!==b.id))}},[T,b.id]),H.useLayoutEffect(()=>{if(!w)return;let qe=Xe.current,ot=qe.style.height;qe.style.height="auto";let yt=qe.getBoundingClientRect().height;qe.style.height=ot,Me(yt),T(kt=>kt.find(Dt=>Dt.toastId===b.id)?kt.map(Dt=>Dt.toastId===b.id?{...Dt,height:yt}:Dt):[{toastId:b.id,height:yt,position:b.position},...kt])},[w,b.title,b.description,T,b.id]);let _t=H.useCallback(()=>{q(!0),le(ze.current),T(qe=>qe.filter(ot=>ot.toastId!==b.id)),setTimeout(()=>{Y(b)},CA)},[b,Y,T,ze]);H.useEffect(()=>{if(b.promise&&Ct==="loading"||b.duration===1/0||b.type==="loading")return;let qe;return M||v||J&&et?(()=>{if(tt.current<ke.current){let ot=new Date().getTime()-ke.current;Pe.current=Pe.current-ot}tt.current=new Date().getTime()})():Pe.current!==1/0&&(ke.current=new Date().getTime(),qe=setTimeout(()=>{var ot;(ot=b.onAutoClose)==null||ot.call(b,b),_t()},Pe.current)),()=>clearTimeout(qe)},[M,v,b,Ct,J,et,_t]),H.useEffect(()=>{b.delete&&_t()},[_t,b.delete]);function Rt(){var qe,ot,yt;return B!=null&&B.loading?H.createElement("div",{className:F(ne==null?void 0:ne.loader,(qe=b==null?void 0:b.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":Ct==="loading"},B.loading):j?H.createElement("div",{className:F(ne==null?void 0:ne.loader,(ot=b==null?void 0:b.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Ct==="loading"},j):H.createElement(iA,{className:F(ne==null?void 0:ne.loader,(yt=b==null?void 0:b.classNames)==null?void 0:yt.loader),visible:Ct==="loading"})}return H.createElement("li",{tabIndex:0,ref:Xe,className:F(de,me,ne==null?void 0:ne.toast,(t=b==null?void 0:b.classNames)==null?void 0:t.toast,ne==null?void 0:ne.default,ne==null?void 0:ne[Ct],(n=b==null?void 0:b.classNames)==null?void 0:n[Ct]),"data-sonner-toast":"","data-rich-colors":(r=b.richColors)!=null?r:X,"data-styled":!(b.jsx||b.unstyled||y),"data-mounted":w,"data-promise":!!b.promise,"data-swiped":Oe,"data-removed":I,"data-visible":dt,"data-y-position":Et,"data-x-position":Bt,"data-index":k,"data-front":st,"data-swiping":ue,"data-dismissible":Se,"data-type":Ct,"data-invert":lt,"data-swipe-out":se,"data-expanded":!!(M||ee&&w),style:{"--index":k,"--toasts-before":k,"--z-index":P.length-k,"--offset":`${I?ce:ze.current}px`,"--initial-height":ee?"auto":`${ve}px`,...Z,...b.style},onPointerDown:qe=>{wt||!Se||(We.current=new Date,le(ze.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(he(!0),ut.current={x:qe.clientX,y:qe.clientY}))},onPointerUp:()=>{var qe,ot,yt,kt;if(se||!Se)return;ut.current=null;let Dt=Number(((qe=Xe.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Kt=new Date().getTime()-((ot=We.current)==null?void 0:ot.getTime()),sn=Math.abs(Dt)/Kt;if(Math.abs(Dt)>=EA||sn>.11){le(ze.current),(yt=b.onDismiss)==null||yt.call(b,b),_t(),Ce(!0),Be(!1);return}(kt=Xe.current)==null||kt.style.setProperty("--swipe-amount","0px"),he(!1)},onPointerMove:qe=>{var ot,yt,kt;if(!ut.current||!Se)return;let Dt=qe.clientY-ut.current.y,Kt=((ot=window.getSelection())==null?void 0:ot.toString().length)>0;Number(((yt=Xe.current)==null?void 0:yt.style.getPropertyValue("--swipe-amount").replace("px",""))||0)>0&&Be(!0),!Kt&&((kt=Xe.current)==null||kt.style.setProperty("--swipe-amount",`${Math.max(0,Dt)}px`))}},Fe&&!b.jsx?H.createElement("button",{"aria-label":W,"data-disabled":wt,"data-close-button":!0,onClick:wt||!Se?()=>{}:()=>{var qe;_t(),(qe=b.onDismiss)==null||qe.call(b,b)},className:F(ne==null?void 0:ne.closeButton,(o=b==null?void 0:b.classNames)==null?void 0:o.closeButton)},(i=B==null?void 0:B.close)!=null?i:uA):null,b.jsx||H.isValidElement(b.title)?b.jsx?b.jsx:typeof b.title=="function"?b.title():b.title:H.createElement(H.Fragment,null,Ct||b.icon||b.promise?H.createElement("div",{"data-icon":"",className:F(ne==null?void 0:ne.icon,(a=b==null?void 0:b.classNames)==null?void 0:a.icon)},b.promise||b.type==="loading"&&!b.icon?b.icon||Rt():null,b.type!=="loading"?b.icon||(B==null?void 0:B[Ct])||rA(Ct):null):null,H.createElement("div",{"data-content":"",className:F(ne==null?void 0:ne.content,(l=b==null?void 0:b.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:F(ne==null?void 0:ne.title,(u=b==null?void 0:b.classNames)==null?void 0:u.title)},typeof b.title=="function"?b.title():b.title),b.description?H.createElement("div",{"data-description":"",className:F(pe,_e,ne==null?void 0:ne.description,(p=b==null?void 0:b.classNames)==null?void 0:p.description)},typeof b.description=="function"?b.description():b.description):null),H.isValidElement(b.cancel)?b.cancel:b.cancel&&Nd(b.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:b.cancelButtonStyle||U,onClick:qe=>{var ot,yt;Nd(b.cancel)&&Se&&((yt=(ot=b.cancel).onClick)==null||yt.call(ot,qe),_t())},className:F(ne==null?void 0:ne.cancelButton,(g=b==null?void 0:b.classNames)==null?void 0:g.cancelButton)},b.cancel.label):null,H.isValidElement(b.action)?b.action:b.action&&Nd(b.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:b.actionButtonStyle||Q,onClick:qe=>{var ot,yt;Nd(b.action)&&((yt=(ot=b.action).onClick)==null||yt.call(ot,qe),!qe.defaultPrevented&&_t())},className:F(ne==null?void 0:ne.actionButton,(_=b==null?void 0:b.classNames)==null?void 0:_.actionButton)},b.action.label):null))};function Zy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var NA=H.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:u,theme:p="light",richColors:g,duration:_,style:C,visibleToasts:b=vA,toastOptions:y,dir:v=Zy(),gap:T=xA,loadingIcon:O,icons:R,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:P,cn:M=wA}=e,[Y,X]=H.useState([]),oe=H.useMemo(()=>Array.from(new Set([r].concat(Y.filter(J=>J.position).map(J=>J.position)))),[Y,r]),[Z,U]=H.useState([]),[Q,de]=H.useState(!1),[pe,te]=H.useState(!1),[fe,V]=H.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=H.useRef(null),ee=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),ne=H.useRef(null),B=H.useRef(!1),W=H.useCallback(J=>{X(F=>{var w;return(w=F.find(N=>N.id===J.id))!=null&&w.delete||ro.dismiss(J.id),F.filter(({id:N})=>N!==J.id)})},[]);return H.useEffect(()=>ro.subscribe(J=>{if(J.dismiss){X(F=>F.map(w=>w.id===J.id?{...w,delete:!0}:w));return}setTimeout(()=>{Mu.flushSync(()=>{X(F=>{let w=F.findIndex(N=>N.id===J.id);return w!==-1?[...F.slice(0,w),{...F[w],...J},...F.slice(w+1)]:[J,...F]})})})}),[]),H.useEffect(()=>{if(p!=="system"){V(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:F})=>{V(F?"dark":"light")})}catch{J.addListener(({matches:w})=>{try{V(w?"dark":"light")}catch(N){console.error(N)}})}},[p]),H.useEffect(()=>{Y.length<=1&&de(!1)},[Y]),H.useEffect(()=>{let J=F=>{var w,N;o.every(I=>F[I]||F.code===I)&&(de(!0),(w=j.current)==null||w.focus()),F.code==="Escape"&&(document.activeElement===j.current||(N=j.current)!=null&&N.contains(document.activeElement))&&de(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[o]),H.useEffect(()=>{if(j.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,B.current=!1)}},[j.current]),H.createElement("section",{"aria-label":`${k} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},oe.map((J,F)=>{var w;let[N,I]=J.split("-");return Y.length?H.createElement("ol",{key:J,dir:v==="auto"?Zy():v,tabIndex:-1,ref:j,className:l,"data-sonner-toaster":!0,"data-theme":fe,"data-y-position":N,"data-lifted":Q&&Y.length>1&&!i,"data-x-position":I,style:{"--front-toast-height":`${((w=Z[0])==null?void 0:w.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||bA,"--width":`${_A}px`,"--gap":`${T}px`,...C},onBlur:q=>{B.current&&!q.currentTarget.contains(q.relatedTarget)&&(B.current=!1,ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||B.current||(B.current=!0,ne.current=q.relatedTarget)},onMouseEnter:()=>de(!0),onMouseMove:()=>de(!0),onMouseLeave:()=>{pe||de(!1)},onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},Y.filter(q=>!q.position&&F===0||q.position===J).map((q,ue)=>{var he,se;return H.createElement(TA,{key:q.id,icons:R,index:ue,toast:q,defaultRichColors:g,duration:(he=y==null?void 0:y.duration)!=null?he:_,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:b,closeButton:(se=y==null?void 0:y.closeButton)!=null?se:a,interacting:pe,position:J,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:W,toasts:Y.filter(Ce=>Ce.position==q.position),heights:Z.filter(Ce=>Ce.position==q.position),setHeights:U,expandByDefault:i,gap:T,loadingIcon:O,expanded:Q,pauseWhenPageIsHidden:P,cn:M})})):null}))});const SA=({...e})=>{const{theme:t="system"}=nA();return re.jsx(NA,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},Ts=()=>{const{sendToParent:e}=Wo("iFrameLoaded",sr),{sendToParent:t}=Wo("pushPageSets",sr),{sendToParent:n}=Wo("openQuickFind",sr),{sendToParent:r}=Wo("sendDevSaveStateData",sr),{sendToParent:o}=Wo("sendDevThemeSaveStateData",sr);return{iFrameLoaded:e,pushPageSets:t,openQuickFind:n,sendDevLayoutSaveStateData:r,sendDevThemeSaveStateData:o}},OA=()=>{const{openQuickFind:e}=Ts(),t=n=>{(n.ctrlKey||n.metaKey)&&n.key==="k"&&e()};H.useEffect(()=>(window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}),[])},Hp=e=>JSON.parse(e.replace(/\\"/g,'"')),au=new Kr,AA=e=>{const{iFrameLoaded:t}=Ts();H.useEffect(()=>{t({payload:{message:"iFrame is loaded"}})},[]);const[n,r]=H.useState(),[o,i]=H.useState(),[a,l]=H.useState(),[u,p]=H.useState(!1),[g,_]=H.useState(),[C,b]=H.useState(!1);return ka("getTemplateMetadata",sr,(y,v)=>{const T=e.get(v.templateId);i(T);const O=v;r(v),au.enable(O.isxYextDebug),au.logData("TEMPLATE_METADATA",O),au.logData("PUCK_CONFIG",T),y({status:"success",payload:{message:"payload received"}})}),ka("getVisualConfigurationData",sr,(y,v)=>{const T=Hp(v.visualConfigurationData);au.logData("VISUAL_CONFIGURATION_DATA",T),l(T),p(!0),y({status:"success",payload:{message:"getVisualConfigurationData received"}})}),ka("getThemeData",sr,(y,v)=>{const T=v,O=T?Hp(T):{};au.logData("THEME_DATA",O),_(O),b(!0),y({status:"success",payload:{message:"getThemeData received"}})}),{visualConfigurationData:a,visualConfigurationDataFetched:u,themeData:g,themeDataFetched:C,templateMetadata:n,puckConfig:o}};function On(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function RA(e,t){const n=ge.createContext(t),r=i=>{const{children:a,...l}=i,u=ge.useMemo(()=>l,Object.values(l));return re.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=ge.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Ql(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];const p=_=>{var O;const{scope:C,children:b,...y}=_,v=((O=C==null?void 0:C[e])==null?void 0:O[u])||l,T=ge.useMemo(()=>y,Object.values(y));return re.jsx(v.Provider,{value:T,children:b})};p.displayName=i+"Provider";function g(_,C){var v;const b=((v=C==null?void 0:C[e])==null?void 0:v[u])||l,y=ge.useContext(b);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${_}\` must be used within \`${i}\``)}return[p,g]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,$A(o,...t)]}function $A(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const _=u(i)[`__scope${p}`];return{...l,..._}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Yi(e){const t=ge.useRef(e);return ge.useEffect(()=>{t.current=e}),ge.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DA(e,t=globalThis==null?void 0:globalThis.document){const n=Yi(e);ge.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var kA="DismissableLayer",Gp="dismissableLayer.update",MA="dismissableLayer.pointerDownOutside",PA="dismissableLayer.focusOutside",Jy,TE=ge.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jg=ge.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,p=ge.useContext(TE),[g,_]=ge.useState(null),C=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=ge.useState({}),y=lr(t,X=>_(X)),v=Array.from(p.layers),[T]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),O=v.indexOf(T),R=g?v.indexOf(g):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,P=R>=O,M=FA(X=>{const oe=X.target,Z=[...p.branches].some(U=>U.contains(oe));!P||Z||(o==null||o(X),a==null||a(X),X.defaultPrevented||l==null||l())},C),Y=jA(X=>{const oe=X.target;[...p.branches].some(U=>U.contains(oe))||(i==null||i(X),a==null||a(X),X.defaultPrevented||l==null||l())},C);return DA(X=>{R===p.layers.size-1&&(r==null||r(X),!X.defaultPrevented&&l&&(X.preventDefault(),l()))},C),ge.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Jy=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),Xy(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=Jy)}},[g,C,n,p]),ge.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),Xy())},[g,p]),ge.useEffect(()=>{const X=()=>b({});return document.addEventListener(Gp,X),()=>document.removeEventListener(Gp,X)},[]),re.jsx(kn.div,{...u,ref:y,style:{pointerEvents:k?P?"auto":"none":void 0,...e.style},onFocusCapture:On(e.onFocusCapture,Y.onFocusCapture),onBlurCapture:On(e.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:On(e.onPointerDownCapture,M.onPointerDownCapture)})});jg.displayName=kA;var IA="DismissableLayerBranch",LA=ge.forwardRef((e,t)=>{const n=ge.useContext(TE),r=ge.useRef(null),o=lr(t,r);return ge.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),re.jsx(kn.div,{...e,ref:o})});LA.displayName=IA;function FA(e,t=globalThis==null?void 0:globalThis.document){const n=Yi(e),r=ge.useRef(!1),o=ge.useRef(()=>{});return ge.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let u=function(){NE(MA,n,p,{discrete:!0})};const p={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jA(e,t=globalThis==null?void 0:globalThis.document){const n=Yi(e),r=ge.useRef(!1);return ge.useEffect(()=>{const o=i=>{i.target&&!r.current&&NE(PA,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xy(){const e=new CustomEvent(Gp);document.dispatchEvent(e)}function NE(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?KO(o,i):o.dispatchEvent(i)}var xs=globalThis!=null&&globalThis.document?ge.useLayoutEffect:()=>{},BA=ge.useId||(()=>{}),WA=0;function Eu(e){const[t,n]=ge.useState(BA());return xs(()=>{n(r=>r??String(WA++))},[e]),t?`radix-${t}`:""}const zA=["top","right","bottom","left"],Ia=Math.min,oo=Math.max,af=Math.round,Sd=Math.floor,bi=e=>({x:e,y:e}),HA={left:"right",right:"left",bottom:"top",top:"bottom"},GA={start:"end",end:"start"};function Kp(e,t,n){return oo(e,Ia(t,n))}function qi(e,t){return typeof e=="function"?e(t):e}function Zi(e){return e.split("-")[0]}function ec(e){return e.split("-")[1]}function Bg(e){return e==="x"?"y":"x"}function Wg(e){return e==="y"?"height":"width"}function La(e){return["top","bottom"].includes(Zi(e))?"y":"x"}function zg(e){return Bg(La(e))}function KA(e,t,n){n===void 0&&(n=!1);const r=ec(e),o=zg(e),i=Wg(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=sf(a)),[a,sf(a)]}function UA(e){const t=sf(e);return[Up(e),t,Up(t)]}function Up(e){return e.replace(/start|end/g,t=>GA[t])}function VA(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function YA(e,t,n,r){const o=ec(e);let i=VA(Zi(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Up)))),i}function sf(e){return e.replace(/left|right|bottom|top/g,t=>HA[t])}function qA(e){return{top:0,right:0,bottom:0,left:0,...e}}function SE(e){return typeof e!="number"?qA(e):{top:e,right:e,bottom:e,left:e}}function lf(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Qy(e,t,n){let{reference:r,floating:o}=e;const i=La(t),a=zg(t),l=Wg(a),u=Zi(t),p=i==="y",g=r.x+r.width/2-o.width/2,_=r.y+r.height/2-o.height/2,C=r[l]/2-o[l]/2;let b;switch(u){case"top":b={x:g,y:r.y-o.height};break;case"bottom":b={x:g,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:_};break;case"left":b={x:r.x-o.width,y:_};break;default:b={x:r.x,y:r.y}}switch(ec(t)){case"start":b[a]-=C*(n&&p?-1:1);break;case"end":b[a]+=C*(n&&p?-1:1);break}return b}const ZA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let p=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:_}=Qy(p,r,u),C=r,b={},y=0;for(let v=0;v<l.length;v++){const{name:T,fn:O}=l[v],{x:R,y:k,data:P,reset:M}=await O({x:g,y:_,initialPlacement:r,placement:C,strategy:o,middlewareData:b,rects:p,platform:a,elements:{reference:e,floating:t}});g=R??g,_=k??_,b={...b,[T]:{...b[T],...P}},M&&y<=50&&(y++,typeof M=="object"&&(M.placement&&(C=M.placement),M.rects&&(p=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):M.rects),{x:g,y:_}=Qy(p,C,u)),v=-1)}return{x:g,y:_,placement:C,strategy:o,middlewareData:b}};async function Su(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:_="floating",altBoundary:C=!1,padding:b=0}=qi(t,e),y=SE(b),T=l[C?_==="floating"?"reference":"floating":_],O=lf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:g,strategy:u})),R=_==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),P=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},M=lf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:R,offsetParent:k,strategy:u}):R);return{top:(O.top-M.top+y.top)/P.y,bottom:(M.bottom-O.bottom+y.bottom)/P.y,left:(O.left-M.left+y.left)/P.x,right:(M.right-O.right+y.right)/P.x}}const JA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:p,padding:g=0}=qi(e,t)||{};if(p==null)return{};const _=SE(g),C={x:n,y:r},b=zg(o),y=Wg(b),v=await a.getDimensions(p),T=b==="y",O=T?"top":"left",R=T?"bottom":"right",k=T?"clientHeight":"clientWidth",P=i.reference[y]+i.reference[b]-C[b]-i.floating[y],M=C[b]-i.reference[b],Y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(p));let X=Y?Y[k]:0;(!X||!await(a.isElement==null?void 0:a.isElement(Y)))&&(X=l.floating[k]||i.floating[y]);const oe=P/2-M/2,Z=X/2-v[y]/2-1,U=Ia(_[O],Z),Q=Ia(_[R],Z),de=U,pe=X-v[y]-Q,te=X/2-v[y]/2+oe,fe=Kp(de,te,pe),V=!u.arrow&&ec(o)!=null&&te!==fe&&i.reference[y]/2-(te<de?U:Q)-v[y]/2<0,j=V?te<de?te-de:te-pe:0;return{[b]:C[b]+j,data:{[b]:fe,centerOffset:te-fe-j,...V&&{alignmentOffset:j}},reset:V}}}),XA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:p}=t,{mainAxis:g=!0,crossAxis:_=!0,fallbackPlacements:C,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...T}=qi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const O=Zi(o),R=La(l),k=Zi(l)===l,P=await(u.isRTL==null?void 0:u.isRTL(p.floating)),M=C||(k||!v?[sf(l)]:UA(l)),Y=y!=="none";!C&&Y&&M.push(...YA(l,v,y,P));const X=[l,...M],oe=await Su(t,T),Z=[];let U=((r=i.flip)==null?void 0:r.overflows)||[];if(g&&Z.push(oe[O]),_){const te=KA(o,a,P);Z.push(oe[te[0]],oe[te[1]])}if(U=[...U,{placement:o,overflows:Z}],!Z.every(te=>te<=0)){var Q,de;const te=(((Q=i.flip)==null?void 0:Q.index)||0)+1,fe=X[te];if(fe)return{data:{index:te,overflows:U},reset:{placement:fe}};let V=(de=U.filter(j=>j.overflows[0]<=0).sort((j,ee)=>j.overflows[1]-ee.overflows[1])[0])==null?void 0:de.placement;if(!V)switch(b){case"bestFit":{var pe;const j=(pe=U.filter(ee=>{if(Y){const ne=La(ee.placement);return ne===R||ne==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ne=>ne>0).reduce((ne,B)=>ne+B,0)]).sort((ee,ne)=>ee[1]-ne[1])[0])==null?void 0:pe[0];j&&(V=j);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function ev(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tv(e){return zA.some(t=>e[t]>=0)}const QA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=qi(e,t);switch(r){case"referenceHidden":{const i=await Su(t,{...o,elementContext:"reference"}),a=ev(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:tv(a)}}}case"escaped":{const i=await Su(t,{...o,altBoundary:!0}),a=ev(i,n.floating);return{data:{escapedOffsets:a,escaped:tv(a)}}}default:return{}}}}};async function eR(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Zi(n),l=ec(n),u=La(n)==="y",p=["left","top"].includes(a)?-1:1,g=i&&u?-1:1,_=qi(t,e);let{mainAxis:C,crossAxis:b,alignmentAxis:y}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return l&&typeof y=="number"&&(b=l==="end"?y*-1:y),u?{x:b*g,y:C*p}:{x:C*p,y:b*g}}const tR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await eR(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},nR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:T=>{let{x:O,y:R}=T;return{x:O,y:R}}},...u}=qi(e,t),p={x:n,y:r},g=await Su(t,u),_=La(Zi(o)),C=Bg(_);let b=p[C],y=p[_];if(i){const T=C==="y"?"top":"left",O=C==="y"?"bottom":"right",R=b+g[T],k=b-g[O];b=Kp(R,b,k)}if(a){const T=_==="y"?"top":"left",O=_==="y"?"bottom":"right",R=y+g[T],k=y-g[O];y=Kp(R,y,k)}const v=l.fn({...t,[C]:b,[_]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[C]:i,[_]:a}}}}}},rR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:p=!0}=qi(e,t),g={x:n,y:r},_=La(o),C=Bg(_);let b=g[C],y=g[_];const v=qi(l,t),T=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=C==="y"?"height":"width",P=i.reference[C]-i.floating[k]+T.mainAxis,M=i.reference[C]+i.reference[k]-T.mainAxis;b<P?b=P:b>M&&(b=M)}if(p){var O,R;const k=C==="y"?"width":"height",P=["top","left"].includes(Zi(o)),M=i.reference[_]-i.floating[k]+(P&&((O=a.offset)==null?void 0:O[_])||0)+(P?0:T.crossAxis),Y=i.reference[_]+i.reference[k]+(P?0:((R=a.offset)==null?void 0:R[_])||0)-(P?T.crossAxis:0);y<M?y=M:y>Y&&(y=Y)}return{[C]:b,[_]:y}}}},oR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...p}=qi(e,t),g=await Su(t,p),_=Zi(o),C=ec(o),b=La(o)==="y",{width:y,height:v}=i.floating;let T,O;_==="top"||_==="bottom"?(T=_,O=C===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(O=_,T=C==="end"?"top":"bottom");const R=v-g.top-g.bottom,k=y-g.left-g.right,P=Ia(v-g[T],R),M=Ia(y-g[O],k),Y=!t.middlewareData.shift;let X=P,oe=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(oe=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(X=R),Y&&!C){const U=oo(g.left,0),Q=oo(g.right,0),de=oo(g.top,0),pe=oo(g.bottom,0);b?oe=y-2*(U!==0||Q!==0?U+Q:oo(g.left,g.right)):X=v-2*(de!==0||pe!==0?de+pe:oo(g.top,g.bottom))}await u({...t,availableWidth:oe,availableHeight:X});const Z=await a.getDimensions(l.floating);return y!==Z.width||v!==Z.height?{reset:{rects:!0}}:{}}}};function Of(){return typeof window<"u"}function tc(e){return OE(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ei(e){var t;return(t=(OE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function OE(e){return Of()?e instanceof Node||e instanceof ao(e).Node:!1}function Ko(e){return Of()?e instanceof Element||e instanceof ao(e).Element:!1}function xi(e){return Of()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function nv(e){return!Of()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}function Pu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Uo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function iR(e){return["table","td","th"].includes(tc(e))}function Af(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Hg(e){const t=Gg(),n=Ko(e)?Uo(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function aR(e){let t=Fa(e);for(;xi(t)&&!Vl(t);){if(Hg(t))return t;if(Af(t))return null;t=Fa(t)}return null}function Gg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vl(e){return["html","body","#document"].includes(tc(e))}function Uo(e){return ao(e).getComputedStyle(e)}function Rf(e){return Ko(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fa(e){if(tc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nv(e)&&e.host||Ei(e);return nv(t)?t.host:t}function AE(e){const t=Fa(e);return Vl(t)?e.ownerDocument?e.ownerDocument.body:e.body:xi(t)&&Pu(t)?t:AE(t)}function Ou(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=AE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ao(o);if(i){const l=Vp(a);return t.concat(a,a.visualViewport||[],Pu(o)?o:[],l&&n?Ou(l):[])}return t.concat(o,Ou(o,[],n))}function Vp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RE(e){const t=Uo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=xi(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=af(n)!==i||af(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Kg(e){return Ko(e)?e:e.contextElement}function Bl(e){const t=Kg(e);if(!xi(t))return bi(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=RE(t);let a=(i?af(n.width):n.width)/r,l=(i?af(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const sR=bi(0);function $E(e){const t=ao(e);return!Gg()||!t.visualViewport?sR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ao(e)?!1:t}function Es(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Kg(e);let a=bi(1);t&&(r?Ko(r)&&(a=Bl(r)):a=Bl(e));const l=lR(i,n,r)?$E(i):bi(0);let u=(o.left+l.x)/a.x,p=(o.top+l.y)/a.y,g=o.width/a.x,_=o.height/a.y;if(i){const C=ao(i),b=r&&Ko(r)?ao(r):r;let y=C,v=Vp(y);for(;v&&r&&b!==y;){const T=Bl(v),O=v.getBoundingClientRect(),R=Uo(v),k=O.left+(v.clientLeft+parseFloat(R.paddingLeft))*T.x,P=O.top+(v.clientTop+parseFloat(R.paddingTop))*T.y;u*=T.x,p*=T.y,g*=T.x,_*=T.y,u+=k,p+=P,y=ao(v),v=Vp(y)}}return lf({width:g,height:_,x:u,y:p})}function Ug(e,t){const n=Rf(e).scrollLeft;return t?t.left+n:Es(Ei(e)).left+n}function DE(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ug(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function cR(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ei(r),l=t?Af(t.floating):!1;if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},p=bi(1);const g=bi(0),_=xi(r);if((_||!_&&!i)&&((tc(r)!=="body"||Pu(a))&&(u=Rf(r)),xi(r))){const b=Es(r);p=Bl(r),g.x=b.x+r.clientLeft,g.y=b.y+r.clientTop}const C=a&&!_&&!i?DE(a,u,!0):bi(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+g.x+C.x,y:n.y*p.y-u.scrollTop*p.y+g.y+C.y}}function uR(e){return Array.from(e.getClientRects())}function dR(e){const t=Ei(e),n=Rf(e),r=e.ownerDocument.body,o=oo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=oo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ug(e);const l=-n.scrollTop;return Uo(r).direction==="rtl"&&(a+=oo(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function fR(e,t){const n=ao(e),r=Ei(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const p=Gg();(!p||p&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function hR(e,t){const n=Es(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=xi(e)?Bl(e):bi(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,u=o*i.x,p=r*i.y;return{width:a,height:l,x:u,y:p}}function rv(e,t,n){let r;if(t==="viewport")r=fR(e,n);else if(t==="document")r=dR(Ei(e));else if(Ko(t))r=hR(t,n);else{const o=$E(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return lf(r)}function kE(e,t){const n=Fa(e);return n===t||!Ko(n)||Vl(n)?!1:Uo(n).position==="fixed"||kE(n,t)}function pR(e,t){const n=t.get(e);if(n)return n;let r=Ou(e,[],!1).filter(l=>Ko(l)&&tc(l)!=="body"),o=null;const i=Uo(e).position==="fixed";let a=i?Fa(e):e;for(;Ko(a)&&!Vl(a);){const l=Uo(a),u=Hg(a);!u&&l.position==="fixed"&&(o=null),(i?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Pu(a)&&!u&&kE(e,a))?r=r.filter(g=>g!==a):o=l,a=Fa(a)}return t.set(e,r),r}function gR(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Af(t)?[]:pR(t,this._c):[].concat(n),r],l=a[0],u=a.reduce((p,g)=>{const _=rv(t,g,o);return p.top=oo(_.top,p.top),p.right=Ia(_.right,p.right),p.bottom=Ia(_.bottom,p.bottom),p.left=oo(_.left,p.left),p},rv(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function mR(e){const{width:t,height:n}=RE(e);return{width:t,height:n}}function yR(e,t,n){const r=xi(t),o=Ei(t),i=n==="fixed",a=Es(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const u=bi(0);if(r||!r&&!i)if((tc(t)!=="body"||Pu(o))&&(l=Rf(t)),r){const C=Es(t,!0,i,t);u.x=C.x+t.clientLeft,u.y=C.y+t.clientTop}else o&&(u.x=Ug(o));const p=o&&!r&&!i?DE(o,l):bi(0),g=a.left+l.scrollLeft-u.x-p.x,_=a.top+l.scrollTop-u.y-p.y;return{x:g,y:_,width:a.width,height:a.height}}function kh(e){return Uo(e).position==="static"}function ov(e,t){if(!xi(e)||Uo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ei(e)===n&&(n=n.ownerDocument.body),n}function ME(e,t){const n=ao(e);if(Af(e))return n;if(!xi(e)){let o=Fa(e);for(;o&&!Vl(o);){if(Ko(o)&&!kh(o))return o;o=Fa(o)}return n}let r=ov(e,t);for(;r&&iR(r)&&kh(r);)r=ov(r,t);return r&&Vl(r)&&kh(r)&&!Hg(r)?n:r||aR(e)||n}const vR=async function(e){const t=this.getOffsetParent||ME,n=this.getDimensions,r=await n(e.floating);return{reference:yR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bR(e){return Uo(e).direction==="rtl"}const _R={convertOffsetParentRelativeRectToViewportRelativeRect:cR,getDocumentElement:Ei,getClippingRect:gR,getOffsetParent:ME,getElementRects:vR,getClientRects:uR,getDimensions:mR,getScale:Bl,isElement:Ko,isRTL:bR};function xR(e,t){let n=null,r;const o=Ei(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),i();const{left:p,top:g,width:_,height:C}=e.getBoundingClientRect();if(l||t(),!_||!C)return;const b=Sd(g),y=Sd(o.clientWidth-(p+_)),v=Sd(o.clientHeight-(g+C)),T=Sd(p),R={rootMargin:-b+"px "+-y+"px "+-v+"px "+-T+"px",threshold:oo(0,Ia(1,u))||1};let k=!0;function P(M){const Y=M[0].intersectionRatio;if(Y!==u){if(!k)return a();Y?a(!1,Y):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(P,{...R,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,R)}n.observe(e)}return a(!0),i}function ER(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,p=Kg(e),g=o||i?[...p?Ou(p):[],...Ou(t)]:[];g.forEach(O=>{o&&O.addEventListener("scroll",n,{passive:!0}),i&&O.addEventListener("resize",n)});const _=p&&l?xR(p,n):null;let C=-1,b=null;a&&(b=new ResizeObserver(O=>{let[R]=O;R&&R.target===p&&b&&(b.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var k;(k=b)==null||k.observe(t)})),n()}),p&&!u&&b.observe(p),b.observe(t));let y,v=u?Es(e):null;u&&T();function T(){const O=Es(e);v&&(O.x!==v.x||O.y!==v.y||O.width!==v.width||O.height!==v.height)&&n(),v=O,y=requestAnimationFrame(T)}return n(),()=>{var O;g.forEach(R=>{o&&R.removeEventListener("scroll",n),i&&R.removeEventListener("resize",n)}),_==null||_(),(O=b)==null||O.disconnect(),b=null,u&&cancelAnimationFrame(y)}}const CR=tR,wR=nR,TR=XA,NR=oR,SR=QA,iv=JA,OR=rR,AR=(e,t,n)=>{const r=new Map,o={platform:_R,...n},i={...o.platform,_c:r};return ZA(e,t,{...o,platform:i})};var qd=typeof document<"u"?H.useLayoutEffect:H.useEffect;function cf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!cf(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!cf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function PE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function av(e,t){const n=PE(e);return Math.round(t*n)/n}function Mh(e){const t=ge.useRef(e);return qd(()=>{t.current=e}),t}function RR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:p}=e,[g,_]=ge.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,b]=ge.useState(r);cf(C,r)||b(r);const[y,v]=ge.useState(null),[T,O]=ge.useState(null),R=ge.useCallback(ee=>{ee!==Y.current&&(Y.current=ee,v(ee))},[]),k=ge.useCallback(ee=>{ee!==X.current&&(X.current=ee,O(ee))},[]),P=i||y,M=a||T,Y=ge.useRef(null),X=ge.useRef(null),oe=ge.useRef(g),Z=u!=null,U=Mh(u),Q=Mh(o),de=Mh(p),pe=ge.useCallback(()=>{if(!Y.current||!X.current)return;const ee={placement:t,strategy:n,middleware:C};Q.current&&(ee.platform=Q.current),AR(Y.current,X.current,ee).then(ne=>{const B={...ne,isPositioned:de.current!==!1};te.current&&!cf(oe.current,B)&&(oe.current=B,nE.flushSync(()=>{_(B)}))})},[C,t,n,Q,de]);qd(()=>{p===!1&&oe.current.isPositioned&&(oe.current.isPositioned=!1,_(ee=>({...ee,isPositioned:!1})))},[p]);const te=ge.useRef(!1);qd(()=>(te.current=!0,()=>{te.current=!1}),[]),qd(()=>{if(P&&(Y.current=P),M&&(X.current=M),P&&M){if(U.current)return U.current(P,M,pe);pe()}},[P,M,pe,U,Z]);const fe=ge.useMemo(()=>({reference:Y,floating:X,setReference:R,setFloating:k}),[R,k]),V=ge.useMemo(()=>({reference:P,floating:M}),[P,M]),j=ge.useMemo(()=>{const ee={position:n,left:0,top:0};if(!V.floating)return ee;const ne=av(V.floating,g.x),B=av(V.floating,g.y);return l?{...ee,transform:"translate("+ne+"px, "+B+"px)",...PE(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:B}},[n,l,V.floating,g.x,g.y]);return ge.useMemo(()=>({...g,update:pe,refs:fe,elements:V,floatingStyles:j}),[g,pe,fe,V,j])}const $R=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?iv({element:r.current,padding:o}).fn(n):{}:r?iv({element:r,padding:o}).fn(n):{}}}},DR=(e,t)=>({...CR(e),options:[e,t]}),kR=(e,t)=>({...wR(e),options:[e,t]}),MR=(e,t)=>({...OR(e),options:[e,t]}),PR=(e,t)=>({...TR(e),options:[e,t]}),IR=(e,t)=>({...NR(e),options:[e,t]}),LR=(e,t)=>({...SR(e),options:[e,t]}),FR=(e,t)=>({...$R(e),options:[e,t]});var jR="Arrow",IE=ge.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return re.jsx(kn.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:re.jsx("polygon",{points:"0,0 30,0 15,10"})})});IE.displayName=jR;var BR=IE;function Vg(e){const[t,n]=ge.useState(void 0);return xs(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,l;if("borderBoxSize"in i){const u=i.borderBoxSize,p=Array.isArray(u)?u[0]:u;a=p.inlineSize,l=p.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yg="Popper",[LE,FE]=Sf(Yg),[WR,jE]=LE(Yg),BE=e=>{const{__scopePopper:t,children:n}=e,[r,o]=ge.useState(null);return re.jsx(WR,{scope:t,anchor:r,onAnchorChange:o,children:n})};BE.displayName=Yg;var WE="PopperAnchor",zE=ge.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=jE(WE,n),a=ge.useRef(null),l=lr(t,a);return ge.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:re.jsx(kn.div,{...o,ref:l})});zE.displayName=WE;var qg="PopperContent",[zR,HR]=LE(qg),HE=ge.forwardRef((e,t)=>{var q,ue,he,se,Ce,Oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:g=0,sticky:_="partial",hideWhenDetached:C=!1,updatePositionStrategy:b="optimized",onPlaced:y,...v}=e,T=jE(qg,n),[O,R]=ge.useState(null),k=lr(t,Be=>R(Be)),[P,M]=ge.useState(null),Y=Vg(P),X=(Y==null?void 0:Y.width)??0,oe=(Y==null?void 0:Y.height)??0,Z=r+(i!=="center"?"-"+i:""),U=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Q=Array.isArray(p)?p:[p],de=Q.length>0,pe={padding:U,boundary:Q.filter(KR),altBoundary:de},{refs:te,floatingStyles:fe,placement:V,isPositioned:j,middlewareData:ee}=RR({strategy:"fixed",placement:Z,whileElementsMounted:(...Be)=>ER(...Be,{animationFrame:b==="always"}),elements:{reference:T.anchor},middleware:[DR({mainAxis:o+oe,alignmentAxis:a}),u&&kR({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?MR():void 0,...pe}),u&&PR({...pe}),IR({...pe,apply:({elements:Be,rects:ce,availableWidth:le,availableHeight:ve})=>{const{width:Me,height:Pe}=ce.reference,We=Be.floating.style;We.setProperty("--radix-popper-available-width",`${le}px`),We.setProperty("--radix-popper-available-height",`${ve}px`),We.setProperty("--radix-popper-anchor-width",`${Me}px`),We.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),P&&FR({element:P,padding:l}),UR({arrowWidth:X,arrowHeight:oe}),C&&LR({strategy:"referenceHidden",...pe})]}),[ne,B]=UE(V),W=Yi(y);xs(()=>{j&&(W==null||W())},[j,W]);const J=(q=ee.arrow)==null?void 0:q.x,F=(ue=ee.arrow)==null?void 0:ue.y,w=((he=ee.arrow)==null?void 0:he.centerOffset)!==0,[N,I]=ge.useState();return xs(()=>{O&&I(window.getComputedStyle(O).zIndex)},[O]),re.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...fe,transform:j?fe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[(se=ee.transformOrigin)==null?void 0:se.x,(Ce=ee.transformOrigin)==null?void 0:Ce.y].join(" "),...((Oe=ee.hide)==null?void 0:Oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:re.jsx(zR,{scope:n,placedSide:ne,onArrowChange:M,arrowX:J,arrowY:F,shouldHideArrow:w,children:re.jsx(kn.div,{"data-side":ne,"data-align":B,...v,ref:k,style:{...v.style,animation:j?void 0:"none"}})})})});HE.displayName=qg;var GE="PopperArrow",GR={top:"bottom",right:"left",bottom:"top",left:"right"},KE=ge.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=HR(GE,r),a=GR[i.placedSide];return re.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:re.jsx(BR,{...o,ref:n,style:{...o.style,display:"block"}})})});KE.displayName=GE;function KR(e){return e!==null}var UR=e=>({name:"transformOrigin",options:e,fn(t){var T,O,R;const{placement:n,rects:r,middlewareData:o}=t,a=((T=o.arrow)==null?void 0:T.centerOffset)!==0,l=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[p,g]=UE(n),_={start:"0%",center:"50%",end:"100%"}[g],C=(((O=o.arrow)==null?void 0:O.x)??0)+l/2,b=(((R=o.arrow)==null?void 0:R.y)??0)+u/2;let y="",v="";return p==="bottom"?(y=a?_:`${C}px`,v=`${-u}px`):p==="top"?(y=a?_:`${C}px`,v=`${r.floating.height+u}px`):p==="right"?(y=`${-u}px`,v=a?_:`${b}px`):p==="left"&&(y=`${r.floating.width+u}px`,v=a?_:`${b}px`),{data:{x:y,y:v}}}});function UE(e){const[t,n="center"]=e.split("-");return[t,n]}var VR=BE,YR=zE,qR=HE,ZR=KE,JR="Portal",VE=ge.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=ge.useState(!1);xs(()=>i(!0),[]);const a=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Mu.createPortal(re.jsx(kn.div,{...r,ref:t}),a):null});VE.displayName=JR;function XR(e,t){return ge.useReducer((n,r)=>t[n][r]??n,e)}var nc=e=>{const{present:t,children:n}=e,r=QR(t),o=typeof n=="function"?n({present:r.isPresent}):ge.Children.only(n),i=lr(r.ref,e$(o));return typeof n=="function"||r.isPresent?ge.cloneElement(o,{ref:i}):null};nc.displayName="Presence";function QR(e){const[t,n]=ge.useState(),r=ge.useRef({}),o=ge.useRef(e),i=ge.useRef("none"),a=e?"mounted":"unmounted",[l,u]=XR(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ge.useEffect(()=>{const p=Od(r.current);i.current=l==="mounted"?p:"none"},[l]),xs(()=>{const p=r.current,g=o.current;if(g!==e){const C=i.current,b=Od(p);e?u("MOUNT"):b==="none"||(p==null?void 0:p.display)==="none"?u("UNMOUNT"):u(g&&C!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),xs(()=>{if(t){let p;const g=t.ownerDocument.defaultView??window,_=b=>{const v=Od(r.current).includes(b.animationName);if(b.target===t&&v&&(u("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",p=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},C=b=>{b.target===t&&(i.current=Od(r.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",_),t.addEventListener("animationend",_),()=>{g.clearTimeout(p),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",_),t.removeEventListener("animationend",_)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:ge.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function Od(e){return(e==null?void 0:e.animationName)||"none"}function e$(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Iu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=t$({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,l=Yi(n),u=ge.useCallback(p=>{if(i){const _=typeof p=="function"?p(e):p;_!==e&&l(_)}else o(p)},[i,e,o,l]);return[a,u]}function t$({defaultProp:e,onChange:t}){const n=ge.useState(e),[r]=n,o=ge.useRef(r),i=Yi(t);return ge.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var n$="VisuallyHidden",YE=ge.forwardRef((e,t)=>re.jsx(kn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));YE.displayName=n$;var r$=YE,[$f,IJ]=Ql("Tooltip",[FE]),Df=FE(),qE="TooltipProvider",o$=700,Yp="tooltip.open",[i$,Zg]=$f(qE),ZE=e=>{const{__scopeTooltip:t,delayDuration:n=o$,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=ge.useState(!0),u=ge.useRef(!1),p=ge.useRef(0);return ge.useEffect(()=>{const g=p.current;return()=>window.clearTimeout(g)},[]),re.jsx(i$,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:ge.useCallback(()=>{window.clearTimeout(p.current),l(!1)},[]),onClose:ge.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:ge.useCallback(g=>{u.current=g},[]),disableHoverableContent:o,children:i})};ZE.displayName=qE;var kf="Tooltip",[a$,Mf]=$f(kf),JE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,u=Zg(kf,e.__scopeTooltip),p=Df(t),[g,_]=ge.useState(null),C=Eu(),b=ge.useRef(0),y=a??u.disableHoverableContent,v=l??u.delayDuration,T=ge.useRef(!1),[O=!1,R]=Iu({prop:r,defaultProp:o,onChange:X=>{X?(u.onOpen(),document.dispatchEvent(new CustomEvent(Yp))):u.onClose(),i==null||i(X)}}),k=ge.useMemo(()=>O?T.current?"delayed-open":"instant-open":"closed",[O]),P=ge.useCallback(()=>{window.clearTimeout(b.current),T.current=!1,R(!0)},[R]),M=ge.useCallback(()=>{window.clearTimeout(b.current),R(!1)},[R]),Y=ge.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{T.current=!0,R(!0)},v)},[v,R]);return ge.useEffect(()=>()=>window.clearTimeout(b.current),[]),re.jsx(VR,{...p,children:re.jsx(a$,{scope:t,contentId:C,open:O,stateAttribute:k,trigger:g,onTriggerChange:_,onTriggerEnter:ge.useCallback(()=>{u.isOpenDelayed?Y():P()},[u.isOpenDelayed,Y,P]),onTriggerLeave:ge.useCallback(()=>{y?M():window.clearTimeout(b.current)},[M,y]),onOpen:P,onClose:M,disableHoverableContent:y,children:n})})};JE.displayName=kf;var qp="TooltipTrigger",XE=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mf(qp,n),i=Zg(qp,n),a=Df(n),l=ge.useRef(null),u=lr(t,l,o.onTriggerChange),p=ge.useRef(!1),g=ge.useRef(!1),_=ge.useCallback(()=>p.current=!1,[]);return ge.useEffect(()=>()=>document.removeEventListener("pointerup",_),[_]),re.jsx(YR,{asChild:!0,...a,children:re.jsx(kn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:On(e.onPointerMove,C=>{C.pointerType!=="touch"&&!g.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:On(e.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:On(e.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",_,{once:!0})}),onFocus:On(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:On(e.onBlur,o.onClose),onClick:On(e.onClick,o.onClose)})})});XE.displayName=qp;var s$="TooltipPortal",[LJ,l$]=$f(s$,{forceMount:void 0}),Yl="TooltipContent",QE=ge.forwardRef((e,t)=>{const n=l$(Yl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Mf(Yl,e.__scopeTooltip);return re.jsx(nc,{present:r||a.open,children:a.disableHoverableContent?re.jsx(eC,{side:o,...i,ref:t}):re.jsx(c$,{side:o,...i,ref:t})})}),c$=ge.forwardRef((e,t)=>{const n=Mf(Yl,e.__scopeTooltip),r=Zg(Yl,e.__scopeTooltip),o=ge.useRef(null),i=lr(t,o),[a,l]=ge.useState(null),{trigger:u,onClose:p}=n,g=o.current,{onPointerInTransitChange:_}=r,C=ge.useCallback(()=>{l(null),_(!1)},[_]),b=ge.useCallback((y,v)=>{const T=y.currentTarget,O={x:y.clientX,y:y.clientY},R=f$(O,T.getBoundingClientRect()),k=h$(O,R),P=p$(v.getBoundingClientRect()),M=m$([...k,...P]);l(M),_(!0)},[_]);return ge.useEffect(()=>()=>C(),[C]),ge.useEffect(()=>{if(u&&g){const y=T=>b(T,g),v=T=>b(T,u);return u.addEventListener("pointerleave",y),g.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",y),g.removeEventListener("pointerleave",v)}}},[u,g,b,C]),ge.useEffect(()=>{if(a){const y=v=>{const T=v.target,O={x:v.clientX,y:v.clientY},R=(u==null?void 0:u.contains(T))||(g==null?void 0:g.contains(T)),k=!g$(O,a);R?C():k&&(C(),p())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,g,a,p,C]),re.jsx(eC,{...e,ref:i})}),[u$,d$]=$f(kf,{isInside:!1}),eC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,u=Mf(Yl,n),p=Df(n),{onClose:g}=u;return ge.useEffect(()=>(document.addEventListener(Yp,g),()=>document.removeEventListener(Yp,g)),[g]),ge.useEffect(()=>{if(u.trigger){const _=C=>{const b=C.target;b!=null&&b.contains(u.trigger)&&g()};return window.addEventListener("scroll",_,{capture:!0}),()=>window.removeEventListener("scroll",_,{capture:!0})}},[u.trigger,g]),re.jsx(jg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:_=>_.preventDefault(),onDismiss:g,children:re.jsxs(qR,{"data-state":u.stateAttribute,...p,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[re.jsx(Pg,{children:r}),re.jsx(u$,{scope:n,isInside:!0,children:re.jsx(r$,{id:u.contentId,role:"tooltip",children:o||r})})]})})});QE.displayName=Yl;var tC="TooltipArrow",nC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Df(n);return d$(tC,n).isInside?null:re.jsx(ZR,{...o,...r,ref:t})});nC.displayName=tC;function f$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function h$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function p$(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function g$(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i].x,u=t[i].y,p=t[a].x,g=t[a].y;u>r!=g>r&&n<(p-l)*(r-u)/(g-u)+l&&(o=!o)}return o}function m$(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),y$(t)}function y$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var v$=ZE,b$=JE,_$=XE,rC=QE,x$=nC;const oC=v$,iC=b$,aC=_$,sC=x$,Jg=ge.forwardRef(({className:e,sideOffset:t=4,...n},r)=>re.jsx(rC,{ref:r,sideOffset:t,className:cn("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...n}));Jg.displayName=rC.displayName;const lo=({displayName:e,fieldId:t,constantValueEnabled:n,children:r})=>{const{tooltipsVisible:o}=uC();if(!o)return r;let i="";return e&&t?i=`${e} (${t})`:t?i=`${t}`:e&&(i=`${e}`),re.jsx("div",{children:re.jsx(oC,{children:re.jsxs(iC,{open:!!i&&!n,children:[re.jsx(aC,{asChild:!0,children:re.jsx("div",{className:"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]",children:r})}),re.jsxs(Jg,{children:[re.jsx("p",{children:i}),re.jsx(sC,{fill:"bg-popover"})]})]})})})},lC=H.createContext(void 0),cC=({children:e})=>{const[t,n]=H.useState(!1),r=()=>{n(o=>!o)};return re.jsx(lC.Provider,{value:{tooltipsVisible:t,toggleTooltips:r},children:e})},uC=()=>{const e=H.useContext(lC);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}};/**
|
|
39
|
+
* @license lucide-react v0.414.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/const E$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dC=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
44
|
+
* @license lucide-react v0.414.0 - ISC
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the ISC license.
|
|
47
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var C$={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
49
|
+
* @license lucide-react v0.414.0 - ISC
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the ISC license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/const w$=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},u)=>H.createElement("svg",{ref:u,...C$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:dC("lucide",o),...l},[...a.map(([p,g])=>H.createElement(p,g)),...Array.isArray(i)?i:[i]]));/**
|
|
54
|
+
* @license lucide-react v0.414.0 - ISC
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the ISC license.
|
|
57
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
+
*/const Ci=(e,t)=>{const n=H.forwardRef(({className:r,...o},i)=>H.createElement(w$,{ref:i,iconNode:t,className:dC(`lucide-${E$(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
59
|
+
* @license lucide-react v0.414.0 - ISC
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the ISC license.
|
|
62
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/const Xg=Ci("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
64
|
+
* @license lucide-react v0.414.0 - ISC
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the ISC license.
|
|
67
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/const T$=Ci("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
69
|
+
* @license lucide-react v0.414.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/const N$=Ci("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
74
|
+
* @license lucide-react v0.414.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/const S$=Ci("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
79
|
+
* @license lucide-react v0.414.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const O$=Ci("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
84
|
+
* @license lucide-react v0.414.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const A$=Ci("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
|
|
89
|
+
* @license lucide-react v0.414.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const R$=Ci("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
94
|
+
* @license lucide-react v0.414.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const $$=Ci("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
99
|
+
* @license lucide-react v0.414.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const D$=Ci("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
104
|
+
* @license lucide-react v0.414.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const k$=Ci("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function fC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fC(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function M$(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fC(e))&&(r&&(r+=" "),r+=t);return r}const sv=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,lv=M$,kr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return lv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(p=>{const g=n==null?void 0:n[p],_=i==null?void 0:i[p];if(g===null)return null;const C=sv(g)||sv(_);return o[p][C]}),l=n&&Object.entries(n).reduce((p,g)=>{let[_,C]=g;return C===void 0||(p[_]=C),p},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,g)=>{let{class:_,className:C,...b}=g;return Object.entries(b).every(y=>{let[v,T]=y;return Array.isArray(T)?T.includes({...i,...l}[v]):{...i,...l}[v]===T})?[...p,_,C]:p},[]);return lv(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},P$=kr("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Vi=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Pa:"button";return re.jsx(a,{className:cn(P$({variant:t,size:n,className:e})),ref:i,...o})});Vi.displayName="Button";const hC=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:n}}}=Gn.usePuck(),r=H.useCallback(o=>{const i=window.matchMedia("(min-width: 638px)").matches,a=o==="left"?t:n,l=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!a,...i?{}:{[l]:!1}}})},[e,t,n]);return re.jsxs(re.Fragment,{children:[re.jsx(Vi,{variant:"ghost",size:"icon",onClick:()=>{r("left")},children:re.jsx(S$,{className:"sm-icon"})}),re.jsx(Vi,{variant:"ghost",size:"icon",onClick:()=>{r("right")},children:re.jsx(O$,{className:"sm-icon"})})]})};function pC(e){const t=ge.useRef({value:e,previous:e});return ge.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Qg="Switch",[I$,FJ]=Ql(Qg),[L$,F$]=I$(Qg),gC=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:p,form:g,..._}=e,[C,b]=ge.useState(null),y=lr(t,k=>b(k)),v=ge.useRef(!1),T=C?g||!!C.closest("form"):!0,[O=!1,R]=Iu({prop:o,defaultProp:i,onChange:p});return re.jsxs(L$,{scope:n,checked:O,disabled:l,children:[re.jsx(kn.button,{type:"button",role:"switch","aria-checked":O,"aria-required":a,"data-state":vC(O),"data-disabled":l?"":void 0,disabled:l,value:u,..._,ref:y,onClick:On(e.onClick,k=>{R(P=>!P),T&&(v.current=k.isPropagationStopped(),v.current||k.stopPropagation())})}),T&&re.jsx(j$,{control:C,bubbles:!v.current,name:r,value:u,checked:O,required:a,disabled:l,form:g,style:{transform:"translateX(-100%)"}})]})});gC.displayName=Qg;var mC="SwitchThumb",yC=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=F$(mC,n);return re.jsx(kn.span,{"data-state":vC(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});yC.displayName=mC;var j$=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=pC(n),l=Vg(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&_){const C=new Event("click",{bubbles:r});_.call(u,n),u.dispatchEvent(C)}},[a,n,r]),re.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function vC(e){return e?"checked":"unchecked"}var bC=gC,B$=yC;const _C=ge.forwardRef(({className:e,...t},n)=>re.jsx(bC,{className:cn("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:n,children:re.jsx(B$,{className:cn("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));_C.displayName=bC.displayName;const xC=()=>{const{toggleTooltips:e,tooltipsVisible:t}=uC();return re.jsx(oC,{children:re.jsxs(iC,{children:[re.jsx(aC,{asChild:!0,children:re.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[re.jsx(_C,{onCheckedChange:e,checked:t}),re.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),re.jsxs(Jg,{children:[t?"Hide Entity Fields":"Show Entity Fields",re.jsx(sC,{fill:"ve-bg-popover"})]})]})})};var Ph="focusScope.autoFocusOnMount",Ih="focusScope.autoFocusOnUnmount",cv={bubbles:!1,cancelable:!0},W$="FocusScope",EC=ge.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=ge.useState(null),p=Yi(o),g=Yi(i),_=ge.useRef(null),C=lr(t,v=>u(v)),b=ge.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ge.useEffect(()=>{if(r){let v=function(k){if(b.paused||!l)return;const P=k.target;l.contains(P)?_.current=P:Aa(_.current,{select:!0})},T=function(k){if(b.paused||!l)return;const P=k.relatedTarget;P!==null&&(l.contains(P)||Aa(_.current,{select:!0}))},O=function(k){if(document.activeElement===document.body)for(const M of k)M.removedNodes.length>0&&Aa(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",T);const R=new MutationObserver(O);return l&&R.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",T),R.disconnect()}}},[r,l,b.paused]),ge.useEffect(()=>{if(l){dv.add(b);const v=document.activeElement;if(!l.contains(v)){const O=new CustomEvent(Ph,cv);l.addEventListener(Ph,p),l.dispatchEvent(O),O.defaultPrevented||(z$(V$(CC(l)),{select:!0}),document.activeElement===v&&Aa(l))}return()=>{l.removeEventListener(Ph,p),setTimeout(()=>{const O=new CustomEvent(Ih,cv);l.addEventListener(Ih,g),l.dispatchEvent(O),O.defaultPrevented||Aa(v??document.body,{select:!0}),l.removeEventListener(Ih,g),dv.remove(b)},0)}}},[l,p,g,b]);const y=ge.useCallback(v=>{if(!n&&!r||b.paused)return;const T=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,O=document.activeElement;if(T&&O){const R=v.currentTarget,[k,P]=H$(R);k&&P?!v.shiftKey&&O===P?(v.preventDefault(),n&&Aa(k,{select:!0})):v.shiftKey&&O===k&&(v.preventDefault(),n&&Aa(P,{select:!0})):O===R&&v.preventDefault()}},[n,r,b.paused]);return re.jsx(kn.div,{tabIndex:-1,...a,ref:C,onKeyDown:y})});EC.displayName=W$;function z$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Aa(r,{select:t}),document.activeElement!==n)return}function H$(e){const t=CC(e),n=uv(t,e),r=uv(t.reverse(),e);return[n,r]}function CC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uv(e,t){for(const n of e)if(!G$(n,{upTo:t}))return n}function G$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function K$(e){return e instanceof HTMLInputElement&&"select"in e}function Aa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&K$(e)&&t&&e.select()}}var dv=U$();function U$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fv(e,t),e.unshift(t)},remove(t){var n;e=fv(e,t),(n=e[0])==null||n.resume()}}}function fv(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function V$(e){return e.filter(t=>t.tagName!=="A")}var Lh=0;function Y$(){ge.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hv()),document.body.insertAdjacentElement("beforeend",e[1]??hv()),Lh++,()=>{Lh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lh--}},[])}function hv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var vi=function(){return vi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},vi.apply(this,arguments)};function wC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function q$(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Zd="right-scroll-bar-position",Jd="width-before-scroll-bar",Z$="with-scroll-bars-hidden",J$="--removed-body-scroll-bar-size";function Fh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function X$(e,t){var n=H.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Q$=typeof window<"u"?ge.useLayoutEffect:ge.useEffect,pv=new WeakMap;function eD(e,t){var n=X$(null,function(r){return e.forEach(function(o){return Fh(o,r)})});return Q$(function(){var r=pv.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||Fh(l,null)}),i.forEach(function(l){o.has(l)||Fh(l,a)})}pv.set(n,e)},[e]),n}function tD(e){return e}function nD(e,t){t===void 0&&(t=tD);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var u=function(){var g=a;a=[],g.forEach(i)},p=function(){return Promise.resolve().then(u)};p(),n={push:function(g){a.push(g),p()},filter:function(g){return a=a.filter(g),n}}}};return o}function rD(e){e===void 0&&(e={});var t=nD(null);return t.options=vi({async:!0,ssr:!1},e),t}var TC=function(e){var t=e.sideCar,n=wC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return ge.createElement(r,vi({},n))};TC.isSideCarExport=!0;function oD(e,t){return e.useMedium(t),TC}var NC=rD(),jh=function(){},Pf=ge.forwardRef(function(e,t){var n=ge.useRef(null),r=ge.useState({onScrollCapture:jh,onWheelCapture:jh,onTouchMoveCapture:jh}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,p=e.removeScrollBar,g=e.enabled,_=e.shards,C=e.sideCar,b=e.noIsolation,y=e.inert,v=e.allowPinchZoom,T=e.as,O=T===void 0?"div":T,R=e.gapMode,k=wC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=C,M=eD([n,t]),Y=vi(vi({},k),o);return ge.createElement(ge.Fragment,null,g&&ge.createElement(P,{sideCar:NC,removeScrollBar:p,shards:_,noIsolation:b,inert:y,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:R}),a?ge.cloneElement(ge.Children.only(l),vi(vi({},Y),{ref:M})):ge.createElement(O,vi({},Y,{className:u,ref:M}),l))});Pf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pf.classNames={fullWidth:Jd,zeroRight:Zd};var iD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iD();return t&&e.setAttribute("nonce",t),e}function sD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=aD())&&(sD(t,n),lD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uD=function(){var e=cD();return function(t,n){ge.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},SC=function(){var e=uD(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},dD={left:0,top:0,right:0,gap:0},Bh=function(e){return parseInt(e||"",10)||0},fD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Bh(n),Bh(r),Bh(o)]},hD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dD;var t=fD(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},pD=SC(),Wl="data-scroll-locked",gD=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
109
|
+
.`.concat(Z$,` {
|
|
110
|
+
overflow: hidden `).concat(r,`;
|
|
111
|
+
padding-right: `).concat(l,"px ").concat(r,`;
|
|
112
|
+
}
|
|
113
|
+
body[`).concat(Wl,`] {
|
|
114
|
+
overflow: hidden `).concat(r,`;
|
|
115
|
+
overscroll-behavior: contain;
|
|
116
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
117
|
+
padding-left: `.concat(o,`px;
|
|
118
|
+
padding-top: `).concat(i,`px;
|
|
119
|
+
padding-right: `).concat(a,`px;
|
|
120
|
+
margin-left:0;
|
|
121
|
+
margin-top:0;
|
|
122
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
123
|
+
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.`).concat(Zd,` {
|
|
127
|
+
right: `).concat(l,"px ").concat(r,`;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.`).concat(Jd,` {
|
|
131
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.`).concat(Zd," .").concat(Zd,` {
|
|
135
|
+
right: 0 `).concat(r,`;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.`).concat(Jd," .").concat(Jd,` {
|
|
139
|
+
margin-right: 0 `).concat(r,`;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
body[`).concat(Wl,`] {
|
|
143
|
+
`).concat(J$,": ").concat(l,`px;
|
|
144
|
+
}
|
|
145
|
+
`)},gv=function(){var e=parseInt(document.body.getAttribute(Wl)||"0",10);return isFinite(e)?e:0},mD=function(){ge.useEffect(function(){return document.body.setAttribute(Wl,(gv()+1).toString()),function(){var e=gv()-1;e<=0?document.body.removeAttribute(Wl):document.body.setAttribute(Wl,e.toString())}},[])},yD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;mD();var i=ge.useMemo(function(){return hD(o)},[o]);return ge.createElement(pD,{styles:gD(i,!t,o,n?"":"!important")})},Zp=!1;if(typeof window<"u")try{var Ad=Object.defineProperty({},"passive",{get:function(){return Zp=!0,!0}});window.addEventListener("test",Ad,Ad),window.removeEventListener("test",Ad,Ad)}catch{Zp=!1}var hl=Zp?{passive:!1}:!1,vD=function(e){return e.tagName==="TEXTAREA"},OC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!vD(e)&&n[t]==="visible")},bD=function(e){return OC(e,"overflowY")},_D=function(e){return OC(e,"overflowX")},mv=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=AC(e,r);if(o){var i=RC(e,r),a=i[1],l=i[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ED=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},AC=function(e,t){return e==="v"?bD(t):_D(t)},RC=function(e,t){return e==="v"?xD(t):ED(t)},CD=function(e,t){return e==="h"&&t==="rtl"?-1:1},wD=function(e,t,n,r,o){var i=CD(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),p=!1,g=a>0,_=0,C=0;do{var b=RC(e,l),y=b[0],v=b[1],T=b[2],O=v-T-i*y;(y||O)&&AC(e,l)&&(_+=O,C+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(g&&(Math.abs(_)<1||!o)||!g&&(Math.abs(C)<1||!o))&&(p=!0),p},Rd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yv=function(e){return[e.deltaX,e.deltaY]},vv=function(e){return e&&"current"in e?e.current:e},TD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ND=function(e){return`
|
|
146
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
147
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
148
|
+
`)},SD=0,pl=[];function OD(e){var t=ge.useRef([]),n=ge.useRef([0,0]),r=ge.useRef(),o=ge.useState(SD++)[0],i=ge.useState(SC)[0],a=ge.useRef(e);ge.useEffect(function(){a.current=e},[e]),ge.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=q$([e.lockRef.current],(e.shards||[]).map(vv),!0).filter(Boolean);return v.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=ge.useCallback(function(v,T){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var O=Rd(v),R=n.current,k="deltaX"in v?v.deltaX:R[0]-O[0],P="deltaY"in v?v.deltaY:R[1]-O[1],M,Y=v.target,X=Math.abs(k)>Math.abs(P)?"h":"v";if("touches"in v&&X==="h"&&Y.type==="range")return!1;var oe=mv(X,Y);if(!oe)return!0;if(oe?M=X:(M=X==="v"?"h":"v",oe=mv(X,Y)),!oe)return!1;if(!r.current&&"changedTouches"in v&&(k||P)&&(r.current=M),!M)return!0;var Z=r.current||M;return wD(Z,T,v,Z==="h"?k:P,!0)},[]),u=ge.useCallback(function(v){var T=v;if(!(!pl.length||pl[pl.length-1]!==i)){var O="deltaY"in T?yv(T):Rd(T),R=t.current.filter(function(M){return M.name===T.type&&(M.target===T.target||T.target===M.shadowParent)&&TD(M.delta,O)})[0];if(R&&R.should){T.cancelable&&T.preventDefault();return}if(!R){var k=(a.current.shards||[]).map(vv).filter(Boolean).filter(function(M){return M.contains(T.target)}),P=k.length>0?l(T,k[0]):!a.current.noIsolation;P&&T.cancelable&&T.preventDefault()}}},[]),p=ge.useCallback(function(v,T,O,R){var k={name:v,delta:T,target:O,should:R,shadowParent:AD(O)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(P){return P!==k})},1)},[]),g=ge.useCallback(function(v){n.current=Rd(v),r.current=void 0},[]),_=ge.useCallback(function(v){p(v.type,yv(v),v.target,l(v,e.lockRef.current))},[]),C=ge.useCallback(function(v){p(v.type,Rd(v),v.target,l(v,e.lockRef.current))},[]);ge.useEffect(function(){return pl.push(i),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:C}),document.addEventListener("wheel",u,hl),document.addEventListener("touchmove",u,hl),document.addEventListener("touchstart",g,hl),function(){pl=pl.filter(function(v){return v!==i}),document.removeEventListener("wheel",u,hl),document.removeEventListener("touchmove",u,hl),document.removeEventListener("touchstart",g,hl)}},[]);var b=e.removeScrollBar,y=e.inert;return ge.createElement(ge.Fragment,null,y?ge.createElement(i,{styles:ND(o)}):null,b?ge.createElement(yD,{gapMode:e.gapMode}):null)}function AD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const RD=oD(NC,OD);var $C=ge.forwardRef(function(e,t){return ge.createElement(Pf,vi({},e,{ref:t,sideCar:RD}))});$C.classNames=Pf.classNames;var $D=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gl=new WeakMap,$d=new WeakMap,Dd={},Wh=0,DC=function(e){return e&&(e.host||DC(e.parentNode))},DD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=DC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},kD=function(e,t,n,r){var o=DD(t,Array.isArray(e)?e:[e]);Dd[n]||(Dd[n]=new WeakMap);var i=Dd[n],a=[],l=new Set,u=new Set(o),p=function(_){!_||l.has(_)||(l.add(_),p(_.parentNode))};o.forEach(p);var g=function(_){!_||u.has(_)||Array.prototype.forEach.call(_.children,function(C){if(l.has(C))g(C);else try{var b=C.getAttribute(r),y=b!==null&&b!=="false",v=(gl.get(C)||0)+1,T=(i.get(C)||0)+1;gl.set(C,v),i.set(C,T),a.push(C),v===1&&y&&$d.set(C,!0),T===1&&C.setAttribute(n,"true"),y||C.setAttribute(r,"true")}catch(O){console.error("aria-hidden: cannot operate on ",C,O)}})};return g(t),l.clear(),Wh++,function(){a.forEach(function(_){var C=gl.get(_)-1,b=i.get(_)-1;gl.set(_,C),i.set(_,b),C||($d.has(_)||_.removeAttribute(r),$d.delete(_)),b||_.removeAttribute(n)}),Wh--,Wh||(gl=new WeakMap,gl=new WeakMap,$d=new WeakMap,Dd={})}},MD=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=$D(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),kD(r,o,n,"aria-hidden")):function(){return null}},em="Dialog",[kC,MC]=Ql(em),[PD,Yo]=kC(em),PC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=ge.useRef(null),u=ge.useRef(null),[p=!1,g]=Iu({prop:r,defaultProp:o,onChange:i});return re.jsx(PD,{scope:t,triggerRef:l,contentRef:u,contentId:Eu(),titleId:Eu(),descriptionId:Eu(),open:p,onOpenChange:g,onOpenToggle:ge.useCallback(()=>g(_=>!_),[g]),modal:a,children:n})};PC.displayName=em;var IC="DialogTrigger",LC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(IC,n),i=lr(t,o.triggerRef);return re.jsx(kn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rm(o.open),...r,ref:i,onClick:On(e.onClick,o.onOpenToggle)})});LC.displayName=IC;var tm="DialogPortal",[ID,FC]=kC(tm,{forceMount:void 0}),jC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Yo(tm,t);return re.jsx(ID,{scope:t,forceMount:n,children:ge.Children.map(r,a=>re.jsx(nc,{present:n||i.open,children:re.jsx(VE,{asChild:!0,container:o,children:a})}))})};jC.displayName=tm;var uf="DialogOverlay",BC=ge.forwardRef((e,t)=>{const n=FC(uf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Yo(uf,e.__scopeDialog);return i.modal?re.jsx(nc,{present:r||i.open,children:re.jsx(LD,{...o,ref:t})}):null});BC.displayName=uf;var LD=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(uf,n);return re.jsx($C,{as:Pa,allowPinchZoom:!0,shards:[o.contentRef],children:re.jsx(kn.div,{"data-state":rm(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Cs="DialogContent",WC=ge.forwardRef((e,t)=>{const n=FC(Cs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Yo(Cs,e.__scopeDialog);return re.jsx(nc,{present:r||i.open,children:i.modal?re.jsx(FD,{...o,ref:t}):re.jsx(jD,{...o,ref:t})})});WC.displayName=Cs;var FD=ge.forwardRef((e,t)=>{const n=Yo(Cs,e.__scopeDialog),r=ge.useRef(null),o=lr(t,n.contentRef,r);return ge.useEffect(()=>{const i=r.current;if(i)return MD(i)},[]),re.jsx(zC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:On(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:On(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:On(e.onFocusOutside,i=>i.preventDefault())})}),jD=ge.forwardRef((e,t)=>{const n=Yo(Cs,e.__scopeDialog),r=ge.useRef(!1),o=ge.useRef(!1);return re.jsx(zC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((p=n.triggerRef.current)==null?void 0:p.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),zC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Yo(Cs,n),u=ge.useRef(null),p=lr(t,u);return Y$(),re.jsxs(re.Fragment,{children:[re.jsx(EC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:re.jsx(jg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":rm(l.open),...a,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),re.jsxs(re.Fragment,{children:[re.jsx(WD,{titleId:l.titleId}),re.jsx(HD,{contentRef:u,descriptionId:l.descriptionId})]})]})}),nm="DialogTitle",HC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(nm,n);return re.jsx(kn.h2,{id:o.titleId,...r,ref:t})});HC.displayName=nm;var GC="DialogDescription",KC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(GC,n);return re.jsx(kn.p,{id:o.descriptionId,...r,ref:t})});KC.displayName=GC;var UC="DialogClose",VC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(UC,n);return re.jsx(kn.button,{type:"button",...r,ref:t,onClick:On(e.onClick,()=>o.onOpenChange(!1))})});VC.displayName=UC;function rm(e){return e?"open":"closed"}var YC="DialogTitleWarning",[BD,qC]=RA(YC,{contentName:Cs,titleName:nm,docsSlug:"dialog"}),WD=({titleId:e})=>{const t=qC(YC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
149
|
+
|
|
150
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
151
|
+
|
|
152
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return ge.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},zD="DialogDescriptionWarning",HD=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qC(zD).contentName}}.`;return ge.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},GD=PC,KD=LC,UD=jC,VD=BC,YD=WC,qD=HC,ZD=KC,ZC=VC,JC="AlertDialog",[JD,jJ]=Ql(JC,[MC]),Qi=MC(),XC=e=>{const{__scopeAlertDialog:t,...n}=e,r=Qi(t);return re.jsx(GD,{...r,...n,modal:!0})};XC.displayName=JC;var XD="AlertDialogTrigger",QC=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(KD,{...o,...r,ref:t})});QC.displayName=XD;var QD="AlertDialogPortal",ew=e=>{const{__scopeAlertDialog:t,...n}=e,r=Qi(t);return re.jsx(UD,{...r,...n})};ew.displayName=QD;var ek="AlertDialogOverlay",tw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(VD,{...o,...r,ref:t})});tw.displayName=ek;var zl="AlertDialogContent",[tk,nk]=JD(zl),nw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=Qi(n),a=ge.useRef(null),l=lr(t,a),u=ge.useRef(null);return re.jsx(BD,{contentName:zl,titleName:rw,docsSlug:"alert-dialog",children:re.jsx(tk,{scope:n,cancelRef:u,children:re.jsxs(YD,{role:"alertdialog",...i,...o,ref:l,onOpenAutoFocus:On(o.onOpenAutoFocus,p=>{var g;p.preventDefault(),(g=u.current)==null||g.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[re.jsx(Pg,{children:r}),re.jsx(ok,{contentRef:a})]})})})});nw.displayName=zl;var rw="AlertDialogTitle",ow=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(qD,{...o,...r,ref:t})});ow.displayName=rw;var iw="AlertDialogDescription",aw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(ZD,{...o,...r,ref:t})});aw.displayName=iw;var rk="AlertDialogAction",sw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qi(n);return re.jsx(ZC,{...o,...r,ref:t})});sw.displayName=rk;var lw="AlertDialogCancel",cw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=nk(lw,n),i=Qi(n),a=lr(t,o);return re.jsx(ZC,{...i,...r,ref:a})});cw.displayName=lw;var ok=({contentRef:e})=>{const t=`\`${zl}\` requires a description for the component to be accessible for screen reader users.
|
|
153
|
+
|
|
154
|
+
You can add a description to the \`${zl}\` by passing a \`${iw}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
155
|
+
|
|
156
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${zl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
157
|
+
|
|
158
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return ge.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ik=XC,ak=QC,sk=ew,uw=tw,dw=nw,fw=sw,hw=cw,pw=ow,gw=aw;const om=kr("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),lk=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Pa:"button";return re.jsx(a,{className:cn(om({variant:t,size:n,className:e})),ref:i,...o})});lk.displayName="Button";const ck=ik,uk=ak,dk=sk,mw=ge.forwardRef(({className:e,...t},n)=>re.jsx(uw,{className:cn("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:n}));mw.displayName=uw.displayName;const yw=ge.forwardRef(({className:e,...t},n)=>re.jsxs(dk,{children:[re.jsx(mw,{}),re.jsx(dw,{ref:n,className:cn("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));yw.displayName=dw.displayName;const vw=({className:e,...t})=>re.jsx("div",{className:cn("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});vw.displayName="AlertDialogHeader";const bw=({className:e,...t})=>re.jsx("div",{className:cn("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});bw.displayName="AlertDialogFooter";const _w=ge.forwardRef(({className:e,...t},n)=>re.jsx(pw,{ref:n,className:cn("ve-text-lg ve-font-semibold",e),...t}));_w.displayName=pw.displayName;const xw=ge.forwardRef(({className:e,...t},n)=>re.jsx(gw,{ref:n,className:cn("ve-text-sm ve-text-muted-foreground",e),...t}));xw.displayName=gw.displayName;const fk=ge.forwardRef(({className:e,...t},n)=>re.jsx(fw,{ref:n,className:cn(om(),e),...t}));fk.displayName=fw.displayName;const Ew=ge.forwardRef(({className:e,...t},n)=>re.jsx(hw,{ref:n,className:cn(om({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));Ew.displayName=hw.displayName;const Cw=({disabled:e,onClearLocalChanges:t})=>{const[n,r]=H.useState(!1),o=()=>{t(),r(!1)};return re.jsxs(ck,{open:n,onOpenChange:r,children:[re.jsx(uk,{disabled:e,asChild:!0,children:re.jsx(Vi,{variant:"outline",children:"Clear Local Changes"})}),re.jsxs(yw,{children:[re.jsxs(vw,{children:[re.jsx(_w,{children:"Clear Local Changes"}),re.jsx(xw,{children:"This action will remove your local changes. It cannot be undone."})]}),re.jsxs(bw,{children:[re.jsx(Ew,{children:"Cancel"}),re.jsx(Vi,{onClick:o,children:"Confirm"})]})]})]})},hk=e=>{const{onClearLocalChanges:t,onHistoryChange:n,onPublishLayout:r,isDevMode:o}=e,{appState:i,history:{back:a,forward:l,histories:u,index:p,hasPast:g,hasFuture:_,setHistories:C}}=Gn.usePuck();return H.useEffect(()=>{n(u,p)},[p,u,n]),re.jsxs("header",{className:"puck-header",children:[re.jsxs("div",{className:"header-left",children:[re.jsx(hC,{}),re.jsx(xC,{})]}),re.jsx("div",{className:"header-center"}),re.jsxs("div",{className:"actions",children:[re.jsx(Vi,{variant:"ghost",size:"icon",disabled:!g,onClick:a,children:re.jsx($$,{className:"sm-icon"})}),re.jsx(Vi,{variant:"ghost",size:"icon",disabled:!_,onClick:l,children:re.jsx(D$,{className:"sm-icon"})}),re.jsx(Cw,{disabled:u.length===1,onClearLocalChanges:()=>{t(),C([{id:"root",state:{data:u[0].state.data}}])}}),!o&&re.jsx(Vi,{variant:"secondary",disabled:u.length===1,onClick:async()=>{await r(i.data),t(),C([{id:"root",state:{data:i.data}}])},children:"Publish"})]})]})},ml=new Kr,pk=({puckConfig:e,puckInitialHistory:t,isLoading:n,clearHistory:r,templateMetadata:o,layoutSaveState:i,saveLayoutSaveState:a,publishVisualConfiguration:l,sendDevSaveStateData:u,buildVisualConfigLocalStorageKey:p})=>{const[g,_]=H.useState(!1),C=H.useRef(0),b=H.useCallback((O,R)=>{R!==0&&C.current!==R&&O.length>0&&(ml.logFunc("handleHistoryChange"),ml.logData("PUCK_INDEX",R),ml.logData("PUCK_HISTORY",O),C.current=R,ml.logFunc("saveToLocalStorage"),window.localStorage.setItem(p(),JSON.stringify(O)),(i==null?void 0:i.hash)!==O[R].id&&(o.isDevMode&&!o.devOverride?(ml.logFunc("sendDevSaveStateData"),u({payload:{devSaveStateData:JSON.stringify(O[R].state.data)}})):(ml.logFunc("saveLayoutSaveState"),a({payload:{hash:O[R].id,history:JSON.stringify(O[R].state)}}))))},[o,p,i]),y=()=>{r(),C.current=0},v=async O=>{l({payload:{visualConfigurationData:JSON.stringify(O)}})},T=async()=>{if(!n&&!g){_(!0);return}};return re.jsx(cC,{children:re.jsx(Gn.Puck,{config:e,data:{},initialHistory:t,onChange:T,overrides:{header:()=>re.jsx(hk,{onClearLocalChanges:y,onHistoryChange:b,onPublishLayout:v,isDevMode:o.isDevMode})}})})},gk={GLOBAL:"global",INDIVIDUAL:"individual"},bv="ROLE_",_v="TEMPLATE_",mk="LAYOUT_",yk="ENTITY_",vk=new Kr,ww=e=>{const t=H.useCallback(()=>e?bk(e.isDevMode&&!e.devOverride,e.role,e.templateId,e.layoutId,e.entityId):"",[e]);return{clearVisualConfigLocalStorage:()=>{vk.logFunc("clearVisualConfigLocalStorage"),window.localStorage.removeItem(t())},buildVisualConfigLocalStorageKey:t}};function bk(e,t,n,r,o){const i=e?"dev":"";if(!t||!n||!o&&!r)throw new Error(`Unable to generate local storage key, missing query parameters${!o&&" entityId"}${!r&&" layoutId"}`);if(t===gk.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return i+bv+t+_v+n+yk+o}if(!r)throw new Error(`LayoutId required for role ${t}`);return i+bv+t+_v+n+mk+r}const _k=()=>{const{sendToParent:e}=Wo("saveSaveState",sr),{sendToParent:t}=Wo("deleteSaveState",sr),{sendToParent:n}=Wo("saveVisualConfigData",sr);return{saveLayoutSaveState:e,deleteLayoutSaveState:t,publishVisualConfiguration:n}},xk=new Kr,Ek=()=>{const{iFrameLoaded:e}=Ts();H.useEffect(()=>{e({payload:{message:"Layout Editor is loaded"}})},[]);const[t,n]=H.useState(),[r,o]=H.useState(!1);return ka("getSaveState",sr,(i,a)=>{let l;a&&(l={...a,history:Hp(a.history)}),xk.logData("SAVE_STATE",l),n(l),o(!0),i({status:"success",payload:{message:"saveState received"}})}),{layoutSaveState:t,layoutSaveStateFetched:r}},Ck="SITE_",wk="THEME_",Tk=new Kr,Tw=e=>{const t=H.useCallback(()=>e!=null&&e.themeEntityId?Nk(e.isDevMode,e.siteId,e.themeEntityId):"",[e]);return{clearThemeLocalStorage:()=>{Tk.logFunc("clearThemeLocalStorage"),window.localStorage.removeItem(t())},buildThemeLocalStorageKey:t}};function Nk(e,t,n){if(!n)throw new Error("Unable to generate local storage key for themes, missing themeEntityId");return(e?"dev":"")+Ck+t+wk+n}const di=new Kr,Sk=e=>{const{puckConfig:t,templateMetadata:n,visualConfigurationData:r,themeData:o,themeConfig:i}=e,{saveLayoutSaveState:a,publishVisualConfiguration:l,deleteLayoutSaveState:u}=_k(),{sendDevLayoutSaveStateData:p,sendDevThemeSaveStateData:g}=Ts(),{layoutSaveState:_,layoutSaveStateFetched:C}=Ek(),{buildVisualConfigLocalStorageKey:b,clearVisualConfigLocalStorage:y}=ww(n),{buildThemeLocalStorageKey:v}=Tw(n),[T,O]=H.useState(),[R,k]=H.useState(!1),P=()=>{di.logFunc("clearHistory"),y(),u()};H.useEffect(()=>{if(!i)return;const oe=window.localStorage.getItem(v());if(n.isDevMode&&oe){const Z=JSON.parse(oe);if(Z.length>0){const U=Z[Z.length-1].data;di.log("Layout Dev Mode - Using theme data from local storage"),g({payload:{devThemeSaveStateData:JSON.stringify(U)}}),Nu(U,i);return}}o&&Nu(o,i)},[o,i,n]);const M=H.useCallback(()=>{if(!n)return;if(di.logFunc("loadPuckInitialHistory"),n.isDevMode&&!n.devOverride){const U=window.localStorage.getItem(b());if(U){di.log("Layout Dev Mode - Using layout data from localStorage");const Q=JSON.parse(U),de=Q.length-1;O({histories:Q,index:de,appendData:!1}),k(!0);return}di.log("Layout Dev Mode - No localStorage. Using layout data from Content"),r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0);return}if(!_){y(),di.log("Layout Prod Mode - No saveState. Using layout data from Content"),r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0);return}const oe=window.localStorage.getItem(b());if(!oe){di.log("Layout Prod Mode - No localStorage. Using layout saveState"),O({histories:r?[{id:"root",state:{data:r}},{id:_.hash,state:{data:_.history.data}}]:[{id:_.hash,state:{data:_.history.data}}],index:r?1:0,appendData:!1}),k(!0);return}const Z=JSON.parse(oe).findIndex(U=>U.id===(_==null?void 0:_.hash));if(Z!==-1){di.log("Layout Prod Mode - Using localStorage visual configuration"),O({histories:JSON.parse(oe),index:Z,appendData:!1}),k(!0);return}y()},[O,k,y,b]);H.useEffect(()=>{C&&M()},[n,C]),H.useEffect(()=>{T&&di.logData("PUCK_INITIAL_HISTORY",T)},[T]),H.useEffect(()=>{if(!R)return;const oe=T==null?void 0:T.histories[T.histories.length-1].state.data;di.logFunc("sendDevSaveStateData useEffect"),p({payload:{devSaveStateData:JSON.stringify(oe)}})},[R,T,n]);const Y=!R||!C,X=60+(R+C)*20;return Y?re.jsx(Fg,{progress:X}):re.jsx(pk,{puckConfig:t,puckInitialHistory:T,isLoading:Y,clearHistory:P,templateMetadata:n,layoutSaveState:_,saveLayoutSaveState:a,publishVisualConfiguration:l,sendDevSaveStateData:p,buildVisualConfigLocalStorageKey:b})},Ok=kr("ve-relative ve-rounded ve-border ve-mx-4 ve-my-3 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Jp=H.forwardRef(({className:e,variant:t,...n},r)=>re.jsx("div",{ref:r,role:"alert",className:cn(Ok({variant:t}),e),...n}));Jp.displayName="Alert";const Ak=H.forwardRef(({className:e,...t},n)=>re.jsx("h5",{ref:n,className:cn("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));Ak.displayName="AlertTitle";const Xp=H.forwardRef(({className:e,...t},n)=>re.jsx("div",{ref:n,className:cn("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));Xp.displayName="AlertDescription";var _o={},Lu={},Rk=typeof Td=="object"&&Td&&Td.Object===Object&&Td,Nw=Rk,$k=Nw,Dk=typeof self=="object"&&self&&self.Object===Object&&self,kk=$k||Dk||Function("return this")(),wi=kk,Mk=wi,Pk=Mk.Symbol,Fu=Pk,xv=Fu,Sw=Object.prototype,Ik=Sw.hasOwnProperty,Lk=Sw.toString,su=xv?xv.toStringTag:void 0;function Fk(e){var t=Ik.call(e,su),n=e[su];try{e[su]=void 0;var r=!0}catch{}var o=Lk.call(e);return r&&(t?e[su]=n:delete e[su]),o}var jk=Fk,Bk=Object.prototype,Wk=Bk.toString;function zk(e){return Wk.call(e)}var Hk=zk,Ev=Fu,Gk=jk,Kk=Hk,Uk="[object Null]",Vk="[object Undefined]",Cv=Ev?Ev.toStringTag:void 0;function Yk(e){return e==null?e===void 0?Vk:Uk:Cv&&Cv in Object(e)?Gk(e):Kk(e)}var Ns=Yk,qk=Array.isArray,qo=qk;function Zk(e){return e!=null&&typeof e=="object"}var ea=Zk,Jk=Ns,Xk=qo,Qk=ea,eM="[object String]";function tM(e){return typeof e=="string"||!Xk(e)&&Qk(e)&&Jk(e)==eM}var nM=tM;function rM(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(n(i[u],u,i)===!1)break}return t}}var oM=rM,iM=oM,aM=iM(),sM=aM;function lM(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var cM=lM,uM=Ns,dM=ea,fM="[object Arguments]";function hM(e){return dM(e)&&uM(e)==fM}var pM=hM,wv=pM,gM=ea,Ow=Object.prototype,mM=Ow.hasOwnProperty,yM=Ow.propertyIsEnumerable,vM=wv(function(){return arguments}())?wv:function(e){return gM(e)&&mM.call(e,"callee")&&!yM.call(e,"callee")},Aw=vM,df={exports:{}};function bM(){return!1}var _M=bM;df.exports;(function(e,t){var n=wi,r=_M,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,l=a?n.Buffer:void 0,u=l?l.isBuffer:void 0,p=u||r;e.exports=p})(df,df.exports);var im=df.exports,xM=9007199254740991,EM=/^(?:0|[1-9]\d*)$/;function CM(e,t){var n=typeof e;return t=t??xM,!!t&&(n=="number"||n!="symbol"&&EM.test(e))&&e>-1&&e%1==0&&e<t}var Rw=CM,wM=9007199254740991;function TM(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wM}var am=TM,NM=Ns,SM=am,OM=ea,AM="[object Arguments]",RM="[object Array]",$M="[object Boolean]",DM="[object Date]",kM="[object Error]",MM="[object Function]",PM="[object Map]",IM="[object Number]",LM="[object Object]",FM="[object RegExp]",jM="[object Set]",BM="[object String]",WM="[object WeakMap]",zM="[object ArrayBuffer]",HM="[object DataView]",GM="[object Float32Array]",KM="[object Float64Array]",UM="[object Int8Array]",VM="[object Int16Array]",YM="[object Int32Array]",qM="[object Uint8Array]",ZM="[object Uint8ClampedArray]",JM="[object Uint16Array]",XM="[object Uint32Array]",Nn={};Nn[GM]=Nn[KM]=Nn[UM]=Nn[VM]=Nn[YM]=Nn[qM]=Nn[ZM]=Nn[JM]=Nn[XM]=!0;Nn[AM]=Nn[RM]=Nn[zM]=Nn[$M]=Nn[HM]=Nn[DM]=Nn[kM]=Nn[MM]=Nn[PM]=Nn[IM]=Nn[LM]=Nn[FM]=Nn[jM]=Nn[BM]=Nn[WM]=!1;function QM(e){return OM(e)&&SM(e.length)&&!!Nn[NM(e)]}var eP=QM;function tP(e){return function(t){return e(t)}}var sm=tP,ff={exports:{}};ff.exports;(function(e,t){var n=Nw,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var u=o&&o.require&&o.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(ff,ff.exports);var lm=ff.exports,nP=eP,rP=sm,Tv=lm,Nv=Tv&&Tv.isTypedArray,oP=Nv?rP(Nv):nP,$w=oP,iP=cM,aP=Aw,sP=qo,lP=im,cP=Rw,uP=$w,dP=Object.prototype,fP=dP.hasOwnProperty;function hP(e,t){var n=sP(e),r=!n&&aP(e),o=!n&&!r&&lP(e),i=!n&&!r&&!o&&uP(e),a=n||r||o||i,l=a?iP(e.length,String):[],u=l.length;for(var p in e)(t||fP.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||cP(p,u)))&&l.push(p);return l}var Dw=hP,pP=Object.prototype;function gP(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||pP;return e===n}var cm=gP;function mP(e,t){return function(n){return e(t(n))}}var kw=mP,yP=kw,vP=yP(Object.keys,Object),bP=vP,_P=cm,xP=bP,EP=Object.prototype,CP=EP.hasOwnProperty;function wP(e){if(!_P(e))return xP(e);var t=[];for(var n in Object(e))CP.call(e,n)&&n!="constructor"&&t.push(n);return t}var TP=wP;function NP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var rc=NP,SP=Ns,OP=rc,AP="[object AsyncFunction]",RP="[object Function]",$P="[object GeneratorFunction]",DP="[object Proxy]";function kP(e){if(!OP(e))return!1;var t=SP(e);return t==RP||t==$P||t==AP||t==DP}var Mw=kP,MP=Mw,PP=am;function IP(e){return e!=null&&PP(e.length)&&!MP(e)}var If=IP,LP=Dw,FP=TP,jP=If;function BP(e){return jP(e)?LP(e):FP(e)}var ju=BP,WP=sM,zP=ju;function HP(e,t){return e&&WP(e,t,zP)}var Pw=HP;function GP(e){return e}var Iw=GP,KP=Iw;function UP(e){return typeof e=="function"?e:KP}var VP=UP,YP=Pw,qP=VP;function ZP(e,t){return e&&YP(e,qP(t))}var um=ZP,JP=kw,XP=JP(Object.getPrototypeOf,Object),dm=XP,QP=Ns,eI=dm,tI=ea,nI="[object Object]",rI=Function.prototype,oI=Object.prototype,Lw=rI.toString,iI=oI.hasOwnProperty,aI=Lw.call(Object);function sI(e){if(!tI(e)||QP(e)!=nI)return!1;var t=eI(e);if(t===null)return!0;var n=iI.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Lw.call(n)==aI}var lI=sI;function cI(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Fw=cI;function uI(){this.__data__=[],this.size=0}var dI=uI;function fI(e,t){return e===t||e!==e&&t!==t}var fm=fI,hI=fm;function pI(e,t){for(var n=e.length;n--;)if(hI(e[n][0],t))return n;return-1}var Lf=pI,gI=Lf,mI=Array.prototype,yI=mI.splice;function vI(e){var t=this.__data__,n=gI(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():yI.call(t,n,1),--this.size,!0}var bI=vI,_I=Lf;function xI(e){var t=this.__data__,n=_I(t,e);return n<0?void 0:t[n][1]}var EI=xI,CI=Lf;function wI(e){return CI(this.__data__,e)>-1}var TI=wI,NI=Lf;function SI(e,t){var n=this.__data__,r=NI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var OI=SI,AI=dI,RI=bI,$I=EI,DI=TI,kI=OI;function oc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}oc.prototype.clear=AI;oc.prototype.delete=RI;oc.prototype.get=$I;oc.prototype.has=DI;oc.prototype.set=kI;var Ff=oc,MI=Ff;function PI(){this.__data__=new MI,this.size=0}var II=PI;function LI(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var FI=LI;function jI(e){return this.__data__.get(e)}var BI=jI;function WI(e){return this.__data__.has(e)}var zI=WI,HI=wi,GI=HI["__core-js_shared__"],KI=GI,zh=KI,Sv=function(){var e=/[^.]+$/.exec(zh&&zh.keys&&zh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function UI(e){return!!Sv&&Sv in e}var VI=UI,YI=Function.prototype,qI=YI.toString;function ZI(e){if(e!=null){try{return qI.call(e)}catch{}try{return e+""}catch{}}return""}var jw=ZI,JI=Mw,XI=VI,QI=rc,eL=jw,tL=/[\\^$.*+?()[\]{}|]/g,nL=/^\[object .+?Constructor\]$/,rL=Function.prototype,oL=Object.prototype,iL=rL.toString,aL=oL.hasOwnProperty,sL=RegExp("^"+iL.call(aL).replace(tL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lL(e){if(!QI(e)||XI(e))return!1;var t=JI(e)?sL:nL;return t.test(eL(e))}var cL=lL;function uL(e,t){return e==null?void 0:e[t]}var dL=uL,fL=cL,hL=dL;function pL(e,t){var n=hL(e,t);return fL(n)?n:void 0}var Ss=pL,gL=Ss,mL=wi,yL=gL(mL,"Map"),hm=yL,vL=Ss,bL=vL(Object,"create"),jf=bL,Ov=jf;function _L(){this.__data__=Ov?Ov(null):{},this.size=0}var xL=_L;function EL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CL=EL,wL=jf,TL="__lodash_hash_undefined__",NL=Object.prototype,SL=NL.hasOwnProperty;function OL(e){var t=this.__data__;if(wL){var n=t[e];return n===TL?void 0:n}return SL.call(t,e)?t[e]:void 0}var AL=OL,RL=jf,$L=Object.prototype,DL=$L.hasOwnProperty;function kL(e){var t=this.__data__;return RL?t[e]!==void 0:DL.call(t,e)}var ML=kL,PL=jf,IL="__lodash_hash_undefined__";function LL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=PL&&t===void 0?IL:t,this}var FL=LL,jL=xL,BL=CL,WL=AL,zL=ML,HL=FL;function ic(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ic.prototype.clear=jL;ic.prototype.delete=BL;ic.prototype.get=WL;ic.prototype.has=zL;ic.prototype.set=HL;var GL=ic,Av=GL,KL=Ff,UL=hm;function VL(){this.size=0,this.__data__={hash:new Av,map:new(UL||KL),string:new Av}}var YL=VL;function qL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ZL=qL,JL=ZL;function XL(e,t){var n=e.__data__;return JL(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Bf=XL,QL=Bf;function eF(e){var t=QL(this,e).delete(e);return this.size-=t?1:0,t}var tF=eF,nF=Bf;function rF(e){return nF(this,e).get(e)}var oF=rF,iF=Bf;function aF(e){return iF(this,e).has(e)}var sF=aF,lF=Bf;function cF(e,t){var n=lF(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var uF=cF,dF=YL,fF=tF,hF=oF,pF=sF,gF=uF;function ac(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ac.prototype.clear=dF;ac.prototype.delete=fF;ac.prototype.get=hF;ac.prototype.has=pF;ac.prototype.set=gF;var pm=ac,mF=Ff,yF=hm,vF=pm,bF=200;function _F(e,t){var n=this.__data__;if(n instanceof mF){var r=n.__data__;if(!yF||r.length<bF-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new vF(r)}return n.set(e,t),this.size=n.size,this}var xF=_F,EF=Ff,CF=II,wF=FI,TF=BI,NF=zI,SF=xF;function sc(e){var t=this.__data__=new EF(e);this.size=t.size}sc.prototype.clear=CF;sc.prototype.delete=wF;sc.prototype.get=TF;sc.prototype.has=NF;sc.prototype.set=SF;var gm=sc,OF="__lodash_hash_undefined__";function AF(e){return this.__data__.set(e,OF),this}var RF=AF;function $F(e){return this.__data__.has(e)}var DF=$F,kF=pm,MF=RF,PF=DF;function hf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new kF;++t<n;)this.add(e[t])}hf.prototype.add=hf.prototype.push=MF;hf.prototype.has=PF;var IF=hf;function LF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var FF=LF;function jF(e,t){return e.has(t)}var BF=jF,WF=IF,zF=FF,HF=BF,GF=1,KF=2;function UF(e,t,n,r,o,i){var a=n&GF,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),g=i.get(t);if(p&&g)return p==t&&g==e;var _=-1,C=!0,b=n&KF?new WF:void 0;for(i.set(e,t),i.set(t,e);++_<l;){var y=e[_],v=t[_];if(r)var T=a?r(v,y,_,t,e,i):r(y,v,_,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(b){if(!zF(t,function(O,R){if(!HF(b,R)&&(y===O||o(y,O,n,r,i)))return b.push(R)})){C=!1;break}}else if(!(y===v||o(y,v,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}var Bw=UF,VF=wi,YF=VF.Uint8Array,Ww=YF;function qF(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var ZF=qF;function JF(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var XF=JF,Rv=Fu,$v=Ww,QF=fm,e2=Bw,t2=ZF,n2=XF,r2=1,o2=2,i2="[object Boolean]",a2="[object Date]",s2="[object Error]",l2="[object Map]",c2="[object Number]",u2="[object RegExp]",d2="[object Set]",f2="[object String]",h2="[object Symbol]",p2="[object ArrayBuffer]",g2="[object DataView]",Dv=Rv?Rv.prototype:void 0,Hh=Dv?Dv.valueOf:void 0;function m2(e,t,n,r,o,i,a){switch(n){case g2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case p2:return!(e.byteLength!=t.byteLength||!i(new $v(e),new $v(t)));case i2:case a2:case c2:return QF(+e,+t);case s2:return e.name==t.name&&e.message==t.message;case u2:case f2:return e==t+"";case l2:var l=t2;case d2:var u=r&r2;if(l||(l=n2),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=o2,a.set(e,t);var g=e2(l(e),l(t),r,o,i,a);return a.delete(e),g;case h2:if(Hh)return Hh.call(e)==Hh.call(t)}return!1}var y2=m2;function v2(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var zw=v2,b2=zw,_2=qo;function x2(e,t,n){var r=t(e);return _2(e)?r:b2(r,n(e))}var Hw=x2;function E2(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}var C2=E2;function w2(){return[]}var Gw=w2,T2=C2,N2=Gw,S2=Object.prototype,O2=S2.propertyIsEnumerable,kv=Object.getOwnPropertySymbols,A2=kv?function(e){return e==null?[]:(e=Object(e),T2(kv(e),function(t){return O2.call(e,t)}))}:N2,mm=A2,R2=Hw,$2=mm,D2=ju;function k2(e){return R2(e,D2,$2)}var Kw=k2,Mv=Kw,M2=1,P2=Object.prototype,I2=P2.hasOwnProperty;function L2(e,t,n,r,o,i){var a=n&M2,l=Mv(e),u=l.length,p=Mv(t),g=p.length;if(u!=g&&!a)return!1;for(var _=u;_--;){var C=l[_];if(!(a?C in t:I2.call(t,C)))return!1}var b=i.get(e),y=i.get(t);if(b&&y)return b==t&&y==e;var v=!0;i.set(e,t),i.set(t,e);for(var T=a;++_<u;){C=l[_];var O=e[C],R=t[C];if(r)var k=a?r(R,O,C,t,e,i):r(O,R,C,e,t,i);if(!(k===void 0?O===R||o(O,R,n,r,i):k)){v=!1;break}T||(T=C=="constructor")}if(v&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var F2=L2,j2=Ss,B2=wi,W2=j2(B2,"DataView"),z2=W2,H2=Ss,G2=wi,K2=H2(G2,"Promise"),U2=K2,V2=Ss,Y2=wi,q2=V2(Y2,"Set"),Z2=q2,J2=Ss,X2=wi,Q2=J2(X2,"WeakMap"),ej=Q2,Qp=z2,eg=hm,tg=U2,ng=Z2,rg=ej,Uw=Ns,lc=jw,Pv="[object Map]",tj="[object Object]",Iv="[object Promise]",Lv="[object Set]",Fv="[object WeakMap]",jv="[object DataView]",nj=lc(Qp),rj=lc(eg),oj=lc(tg),ij=lc(ng),aj=lc(rg),ms=Uw;(Qp&&ms(new Qp(new ArrayBuffer(1)))!=jv||eg&&ms(new eg)!=Pv||tg&&ms(tg.resolve())!=Iv||ng&&ms(new ng)!=Lv||rg&&ms(new rg)!=Fv)&&(ms=function(e){var t=Uw(e),n=t==tj?e.constructor:void 0,r=n?lc(n):"";if(r)switch(r){case nj:return jv;case rj:return Pv;case oj:return Iv;case ij:return Lv;case aj:return Fv}return t});var Wf=ms,Gh=gm,sj=Bw,lj=y2,cj=F2,Bv=Wf,Wv=qo,zv=im,uj=$w,dj=1,Hv="[object Arguments]",Gv="[object Array]",kd="[object Object]",fj=Object.prototype,Kv=fj.hasOwnProperty;function hj(e,t,n,r,o,i){var a=Wv(e),l=Wv(t),u=a?Gv:Bv(e),p=l?Gv:Bv(t);u=u==Hv?kd:u,p=p==Hv?kd:p;var g=u==kd,_=p==kd,C=u==p;if(C&&zv(e)){if(!zv(t))return!1;a=!0,g=!1}if(C&&!g)return i||(i=new Gh),a||uj(e)?sj(e,t,n,r,o,i):lj(e,t,u,n,r,o,i);if(!(n&dj)){var b=g&&Kv.call(e,"__wrapped__"),y=_&&Kv.call(t,"__wrapped__");if(b||y){var v=b?e.value():e,T=y?t.value():t;return i||(i=new Gh),o(v,T,n,r,i)}}return C?(i||(i=new Gh),cj(e,t,n,r,o,i)):!1}var pj=hj,gj=pj,Uv=ea;function Vw(e,t,n,r,o){return e===t?!0:e==null||t==null||!Uv(e)&&!Uv(t)?e!==e&&t!==t:gj(e,t,n,r,Vw,o)}var Yw=Vw,mj=gm,yj=Yw,vj=1,bj=2;function _j(e,t,n,r){var o=n.length,i=o,a=!r;if(e==null)return!i;for(e=Object(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<i;){l=n[o];var u=l[0],p=e[u],g=l[1];if(a&&l[2]){if(p===void 0&&!(u in e))return!1}else{var _=new mj;if(r)var C=r(p,g,u,e,t,_);if(!(C===void 0?yj(g,p,vj|bj,r,_):C))return!1}}return!0}var xj=_j,Ej=rc;function Cj(e){return e===e&&!Ej(e)}var qw=Cj,wj=qw,Tj=ju;function Nj(e){for(var t=Tj(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,wj(o)]}return t}var Sj=Nj;function Oj(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Zw=Oj,Aj=xj,Rj=Sj,$j=Zw;function Dj(e){var t=Rj(e);return t.length==1&&t[0][2]?$j(t[0][0],t[0][1]):function(n){return n===e||Aj(n,e,t)}}var kj=Dj,Mj=Ns,Pj=ea,Ij="[object Symbol]";function Lj(e){return typeof e=="symbol"||Pj(e)&&Mj(e)==Ij}var ym=Lj,Fj=qo,jj=ym,Bj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wj=/^\w*$/;function zj(e,t){if(Fj(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||jj(e)?!0:Wj.test(e)||!Bj.test(e)||t!=null&&e in Object(t)}var vm=zj,Jw=pm,Hj="Expected a function";function bm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Hj);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(bm.Cache||Jw),n}bm.Cache=Jw;var Gj=bm,Kj=Gj,Uj=500;function Vj(e){var t=Kj(e,function(r){return n.size===Uj&&n.clear(),r}),n=t.cache;return t}var Yj=Vj,qj=Yj,Zj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jj=/\\(\\)?/g,Xj=qj(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Zj,function(n,r,o,i){t.push(o?i.replace(Jj,"$1"):r||n)}),t}),Qj=Xj,Vv=Fu,eB=Fw,tB=qo,nB=ym,rB=1/0,Yv=Vv?Vv.prototype:void 0,qv=Yv?Yv.toString:void 0;function Xw(e){if(typeof e=="string")return e;if(tB(e))return eB(e,Xw)+"";if(nB(e))return qv?qv.call(e):"";var t=e+"";return t=="0"&&1/e==-rB?"-0":t}var oB=Xw,iB=oB;function aB(e){return e==null?"":iB(e)}var sB=aB,lB=qo,cB=vm,uB=Qj,dB=sB;function fB(e,t){return lB(e)?e:cB(e,t)?[e]:uB(dB(e))}var Qw=fB,hB=ym,pB=1/0;function gB(e){if(typeof e=="string"||hB(e))return e;var t=e+"";return t=="0"&&1/e==-pB?"-0":t}var zf=gB,mB=Qw,yB=zf;function vB(e,t){t=mB(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[yB(t[n++])];return n&&n==r?e:void 0}var eT=vB,bB=eT;function _B(e,t,n){var r=e==null?void 0:bB(e,t);return r===void 0?n:r}var xB=_B;function EB(e,t){return e!=null&&t in Object(e)}var CB=EB,wB=Qw,TB=Aw,NB=qo,SB=Rw,OB=am,AB=zf;function RB(e,t,n){t=wB(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=AB(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&OB(o)&&SB(a,o)&&(NB(e)||TB(e)))}var $B=RB,DB=CB,kB=$B;function MB(e,t){return e!=null&&kB(e,t,DB)}var PB=MB,IB=Yw,LB=xB,FB=PB,jB=vm,BB=qw,WB=Zw,zB=zf,HB=1,GB=2;function KB(e,t){return jB(e)&&BB(t)?WB(zB(e),t):function(n){var r=LB(n,e);return r===void 0&&r===t?FB(n,e):IB(t,r,HB|GB)}}var UB=KB;function VB(e){return function(t){return t==null?void 0:t[e]}}var YB=VB,qB=eT;function ZB(e){return function(t){return qB(t,e)}}var JB=ZB,XB=YB,QB=JB,eW=vm,tW=zf;function nW(e){return eW(e)?XB(tW(e)):QB(e)}var rW=nW,oW=kj,iW=UB,aW=Iw,sW=qo,lW=rW;function cW(e){return typeof e=="function"?e:e==null?aW:typeof e=="object"?sW(e)?iW(e[0],e[1]):oW(e):lW(e)}var uW=cW,dW=If;function fW(e,t){return function(n,r){if(n==null)return n;if(!dW(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}var hW=fW,pW=Pw,gW=hW,mW=gW(pW),yW=mW,vW=yW,bW=If;function _W(e,t){var n=-1,r=bW(e)?Array(e.length):[];return vW(e,function(o,i,a){r[++n]=t(o,i,a)}),r}var xW=_W,EW=Fw,CW=uW,wW=xW,TW=qo;function NW(e,t){var n=TW(e)?EW:wW;return n(e,CW(t))}var SW=NW;Object.defineProperty(Lu,"__esModule",{value:!0});Lu.flattenNames=void 0;var OW=nM,AW=Hf(OW),RW=um,$W=Hf(RW),DW=lI,kW=Hf(DW),MW=SW,PW=Hf(MW);function Hf(e){return e&&e.__esModule?e:{default:e}}var IW=Lu.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,PW.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,kW.default)(r)?(0,$W.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,AW.default)(r)&&n.push(r)}),n};Lu.default=IW;var Bu={};function LW(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var FW=LW,jW=Ss,BW=function(){try{var e=jW(Object,"defineProperty");return e({},"",{}),e}catch{}}(),WW=BW,Zv=WW;function zW(e,t,n){t=="__proto__"&&Zv?Zv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var tT=zW,HW=tT,GW=fm,KW=Object.prototype,UW=KW.hasOwnProperty;function VW(e,t,n){var r=e[t];(!(UW.call(e,t)&&GW(r,n))||n===void 0&&!(t in e))&&HW(e,t,n)}var nT=VW,YW=nT,qW=tT;function ZW(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=r?r(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),o?qW(n,l,u):YW(n,l,u)}return n}var Gf=ZW,JW=Gf,XW=ju;function QW(e,t){return e&&JW(t,XW(t),e)}var e3=QW;function t3(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var n3=t3,r3=rc,o3=cm,i3=n3,a3=Object.prototype,s3=a3.hasOwnProperty;function l3(e){if(!r3(e))return i3(e);var t=o3(e),n=[];for(var r in e)r=="constructor"&&(t||!s3.call(e,r))||n.push(r);return n}var c3=l3,u3=Dw,d3=c3,f3=If;function h3(e){return f3(e)?u3(e,!0):d3(e)}var _m=h3,p3=Gf,g3=_m;function m3(e,t){return e&&p3(t,g3(t),e)}var y3=m3,pf={exports:{}};pf.exports;(function(e,t){var n=wi,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i?n.Buffer:void 0,l=a?a.allocUnsafe:void 0;function u(p,g){if(g)return p.slice();var _=p.length,C=l?l(_):new p.constructor(_);return p.copy(C),C}e.exports=u})(pf,pf.exports);var v3=pf.exports;function b3(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var _3=b3,x3=Gf,E3=mm;function C3(e,t){return x3(e,E3(e),t)}var w3=C3,T3=zw,N3=dm,S3=mm,O3=Gw,A3=Object.getOwnPropertySymbols,R3=A3?function(e){for(var t=[];e;)T3(t,S3(e)),e=N3(e);return t}:O3,rT=R3,$3=Gf,D3=rT;function k3(e,t){return $3(e,D3(e),t)}var M3=k3,P3=Hw,I3=rT,L3=_m;function F3(e){return P3(e,L3,I3)}var j3=F3,B3=Object.prototype,W3=B3.hasOwnProperty;function z3(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&W3.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var H3=z3,Jv=Ww;function G3(e){var t=new e.constructor(e.byteLength);return new Jv(t).set(new Jv(e)),t}var xm=G3,K3=xm;function U3(e,t){var n=t?K3(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var V3=U3,Y3=/\w*$/;function q3(e){var t=new e.constructor(e.source,Y3.exec(e));return t.lastIndex=e.lastIndex,t}var Z3=q3,Xv=Fu,Qv=Xv?Xv.prototype:void 0,e0=Qv?Qv.valueOf:void 0;function J3(e){return e0?Object(e0.call(e)):{}}var X3=J3,Q3=xm;function ez(e,t){var n=t?Q3(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var tz=ez,nz=xm,rz=V3,oz=Z3,iz=X3,az=tz,sz="[object Boolean]",lz="[object Date]",cz="[object Map]",uz="[object Number]",dz="[object RegExp]",fz="[object Set]",hz="[object String]",pz="[object Symbol]",gz="[object ArrayBuffer]",mz="[object DataView]",yz="[object Float32Array]",vz="[object Float64Array]",bz="[object Int8Array]",_z="[object Int16Array]",xz="[object Int32Array]",Ez="[object Uint8Array]",Cz="[object Uint8ClampedArray]",wz="[object Uint16Array]",Tz="[object Uint32Array]";function Nz(e,t,n){var r=e.constructor;switch(t){case gz:return nz(e);case sz:case lz:return new r(+e);case mz:return rz(e,n);case yz:case vz:case bz:case _z:case xz:case Ez:case Cz:case wz:case Tz:return az(e,n);case cz:return new r;case uz:case hz:return new r(e);case dz:return oz(e);case fz:return new r;case pz:return iz(e)}}var Sz=Nz,Oz=rc,t0=Object.create,Az=function(){function e(){}return function(t){if(!Oz(t))return{};if(t0)return t0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Rz=Az,$z=Rz,Dz=dm,kz=cm;function Mz(e){return typeof e.constructor=="function"&&!kz(e)?$z(Dz(e)):{}}var Pz=Mz,Iz=Wf,Lz=ea,Fz="[object Map]";function jz(e){return Lz(e)&&Iz(e)==Fz}var Bz=jz,Wz=Bz,zz=sm,n0=lm,r0=n0&&n0.isMap,Hz=r0?zz(r0):Wz,Gz=Hz,Kz=Wf,Uz=ea,Vz="[object Set]";function Yz(e){return Uz(e)&&Kz(e)==Vz}var qz=Yz,Zz=qz,Jz=sm,o0=lm,i0=o0&&o0.isSet,Xz=i0?Jz(i0):Zz,Qz=Xz,e5=gm,t5=FW,n5=nT,r5=e3,o5=y3,i5=v3,a5=_3,s5=w3,l5=M3,c5=Kw,u5=j3,d5=Wf,f5=H3,h5=Sz,p5=Pz,g5=qo,m5=im,y5=Gz,v5=rc,b5=Qz,_5=ju,x5=_m,E5=1,C5=2,w5=4,oT="[object Arguments]",T5="[object Array]",N5="[object Boolean]",S5="[object Date]",O5="[object Error]",iT="[object Function]",A5="[object GeneratorFunction]",R5="[object Map]",$5="[object Number]",aT="[object Object]",D5="[object RegExp]",k5="[object Set]",M5="[object String]",P5="[object Symbol]",I5="[object WeakMap]",L5="[object ArrayBuffer]",F5="[object DataView]",j5="[object Float32Array]",B5="[object Float64Array]",W5="[object Int8Array]",z5="[object Int16Array]",H5="[object Int32Array]",G5="[object Uint8Array]",K5="[object Uint8ClampedArray]",U5="[object Uint16Array]",V5="[object Uint32Array]",Cn={};Cn[oT]=Cn[T5]=Cn[L5]=Cn[F5]=Cn[N5]=Cn[S5]=Cn[j5]=Cn[B5]=Cn[W5]=Cn[z5]=Cn[H5]=Cn[R5]=Cn[$5]=Cn[aT]=Cn[D5]=Cn[k5]=Cn[M5]=Cn[P5]=Cn[G5]=Cn[K5]=Cn[U5]=Cn[V5]=!0;Cn[O5]=Cn[iT]=Cn[I5]=!1;function Xd(e,t,n,r,o,i){var a,l=t&E5,u=t&C5,p=t&w5;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!v5(e))return e;var g=g5(e);if(g){if(a=f5(e),!l)return a5(e,a)}else{var _=d5(e),C=_==iT||_==A5;if(m5(e))return i5(e,l);if(_==aT||_==oT||C&&!o){if(a=u||C?{}:p5(e),!l)return u?l5(e,o5(a,e)):s5(e,r5(a,e))}else{if(!Cn[_])return o?e:{};a=h5(e,_,l)}}i||(i=new e5);var b=i.get(e);if(b)return b;i.set(e,a),b5(e)?e.forEach(function(T){a.add(Xd(T,t,n,T,e,i))}):y5(e)&&e.forEach(function(T,O){a.set(O,Xd(T,t,n,O,e,i))});var y=p?u?u5:c5:u?x5:_5,v=g?void 0:y(e);return t5(v||e,function(T,O){v&&(O=T,T=e[O]),n5(a,O,Xd(T,t,n,O,e,i))}),a}var Y5=Xd,q5=Y5,Z5=1,J5=4;function X5(e){return q5(e,Z5|J5)}var Q5=X5;Object.defineProperty(Bu,"__esModule",{value:!0});Bu.mergeClasses=void 0;var eH=um,tH=sT(eH),nH=Q5,rH=sT(nH),oH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function sT(e){return e&&e.__esModule?e:{default:e}}var iH=Bu.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,rH.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,tH.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=oH({},r[l],i[l])}),o}),r};Bu.default=iH;var Wu={};Object.defineProperty(Wu,"__esModule",{value:!0});Wu.autoprefix=void 0;var aH=um,a0=lH(aH),sH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function lH(e){return e&&e.__esModule?e:{default:e}}var cH={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},uH=Wu.autoprefix=function(t){var n={};return(0,a0.default)(t,function(r,o){var i={};(0,a0.default)(r,function(a,l){var u=cH[l];u?i=sH({},i,u(a)):i[l]=a}),n[o]=i}),n};Wu.default=uH;var zu={};Object.defineProperty(zu,"__esModule",{value:!0});zu.hover=void 0;var dH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fH=H,Kh=hH(fH);function hH(e){return e&&e.__esModule?e:{default:e}}function pH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function gH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var mH=zu.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){gH(o,r);function o(){var i,a,l,u;pH(this,o);for(var p=arguments.length,g=Array(p),_=0;_<p;_++)g[_]=arguments[_];return u=(a=(l=s0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(g))),l),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return Kh.default.createElement(n,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},Kh.default.createElement(t,dH({},l.props,l.state)))},a),s0(l,u)}return o}(Kh.default.Component)};zu.default=mH;var Hu={};Object.defineProperty(Hu,"__esModule",{value:!0});Hu.active=void 0;var yH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vH=H,Uh=bH(vH);function bH(e){return e&&e.__esModule?e:{default:e}}function _H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function xH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var EH=Hu.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){xH(o,r);function o(){var i,a,l,u;_H(this,o);for(var p=arguments.length,g=Array(p),_=0;_<p;_++)g[_]=arguments[_];return u=(a=(l=l0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(g))),l),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return Uh.default.createElement(n,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},Uh.default.createElement(t,yH({},l.props,l.state)))},a),l0(l,u)}return o}(Uh.default.Component)};Hu.default=EH;var Em={};Object.defineProperty(Em,"__esModule",{value:!0});var CH=function(t,n){var r={},o=function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};Em.default=CH;Object.defineProperty(_o,"__esModule",{value:!0});_o.ReactCSS=_o.loop=_o.handleActive=Cm=_o.handleHover=_o.hover=void 0;var wH=Lu,TH=cc(wH),NH=Bu,SH=cc(NH),OH=Wu,AH=cc(OH),RH=zu,lT=cc(RH),$H=Hu,DH=cc($H),kH=Em,MH=cc(kH);function cc(e){return e&&e.__esModule?e:{default:e}}_o.hover=lT.default;var Cm=_o.handleHover=lT.default;_o.handleActive=DH.default;_o.loop=MH.default;var PH=_o.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(0,TH.default)(r),a=(0,SH.default)(t,i);return(0,AH.default)(a)},zt=_o.default=PH,IH=function(t,n,r,o,i){var a=i.clientWidth,l=i.clientHeight,u=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,p=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,g=u-(i.getBoundingClientRect().left+window.pageXOffset),_=p-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var C=void 0;if(_<0?C=0:_>l?C=1:C=Math.round(_*100/l)/100,n.a!==C)return{h:n.h,s:n.s,l:n.l,a:C,source:"rgb"}}else{var b=void 0;if(g<0?b=0:g>a?b=1:b=Math.round(g*100/a)/100,o!==b)return{h:n.h,s:n.s,l:n.l,a:b,source:"rgb"}}return null},Vh={},LH=function(t,n,r,o){if(typeof document>"u"&&!o)return null;var i=o?new o:document.createElement("canvas");i.width=r*2,i.height=r*2;var a=i.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,i.width,i.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),i.toDataURL()):null},FH=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(Vh[i])return Vh[i];var a=LH(t,n,r,o);return Vh[i]=a,a},c0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uc=function(t){var n=t.white,r=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,l=t.boxShadow,u=t.children,p=zt({default:{grid:{borderRadius:a,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+FH(n,r,o,i.canvas)+") center left"}}});return H.isValidElement(u)?H.cloneElement(u,c0({},u.props,{style:c0({},u.props.style,p.grid)})):H.createElement("div",{style:p.grid})};uc.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var jH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BH=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function WH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function zH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var wm=function(e){zH(t,e);function t(){var n,r,o,i;WH(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=u0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var g=IH(p,o.props.hsl,o.props.direction,o.props.a,o.container);g&&typeof o.props.onChange=="function"&&o.props.onChange(g,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},r),u0(o,i)}return BH(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,o=this.props.rgb,i=zt({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
159
|
+
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:o.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
160
|
+
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)"},pointer:{left:0,top:o.a*100+"%"}},overwrite:jH({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return H.createElement("div",{style:i.alpha},H.createElement("div",{style:i.checkboard},H.createElement(uc,{renderers:this.props.renderers})),H.createElement("div",{style:i.gradient}),H.createElement("div",{style:i.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("div",{style:i.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:i.slider}))))}}]),t}(H.PureComponent||H.Component),HH=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function GH(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UH(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function VH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var YH=1,cT=38,qH=40,ZH=[cT,qH],JH=function(t){return ZH.indexOf(t)>-1},XH=function(t){return Number(String(t).replace(/%/g,""))},QH=1,en=function(e){VH(t,e);function t(n){KH(this,t);var r=UH(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var i=XH(o.target.value);if(!isNaN(i)&&JH(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===cT?i+a:i-a;r.setUpdatedValue(l,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var i=Math.round(r.props.value+o.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+QH++,r}return HH(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return GH({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||YH}},{key:"setUpdatedValue",value:function(r,o){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=zt({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return H.createElement("div",{style:o.wrap},H.createElement("input",{id:this.inputId,style:o.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?H.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(H.PureComponent||H.Component),e4=function(t,n,r,o){var i=o.clientWidth,a=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(o.getBoundingClientRect().left+window.pageXOffset),g=u-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var _=void 0;if(g<0)_=359;else if(g>a)_=0;else{var C=-(g*100/a)+100;_=360*C/100}if(r.h!==_)return{h:_,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var b=void 0;if(p<0)b=0;else if(p>i)b=359;else{var y=p*100/i;b=360*y/100}if(r.h!==b)return{h:b,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},t4=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function r4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var dc=function(e){r4(t,e);function t(){var n,r,o,i;n4(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=d0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var g=e4(p,o.props.direction,o.props.hsl,o.container);g&&typeof o.props.onChange=="function"&&o.props.onChange(g,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},r),d0(o,i)}return t4(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.direction,i=o===void 0?"horizontal":o,a=zt({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return H.createElement("div",{style:a.hue},H.createElement("div",{className:"hue-"+i,style:a.container,ref:function(u){return r.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
|
|
161
|
+
.hue-horizontal {
|
|
162
|
+
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
163
|
+
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
164
|
+
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
165
|
+
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.hue-vertical {
|
|
169
|
+
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
170
|
+
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
171
|
+
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
172
|
+
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
173
|
+
}
|
|
174
|
+
`),H.createElement("div",{style:a.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:a.slider}))))}}]),t}(H.PureComponent||H.Component),og={exports:{}},Md={exports:{}},dn={};/** @license React v16.13.1
|
|
175
|
+
* react-is.production.min.js
|
|
176
|
+
*
|
|
177
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the MIT license found in the
|
|
180
|
+
* LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/var f0;function o4(){if(f0)return dn;f0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function k(M){if(typeof M=="object"&&M!==null){var Y=M.$$typeof;switch(Y){case t:switch(M=M.type,M){case u:case p:case r:case i:case o:case _:return M;default:switch(M=M&&M.$$typeof,M){case l:case g:case y:case b:case a:return M;default:return Y}}case n:return Y}}}function P(M){return k(M)===p}return dn.AsyncMode=u,dn.ConcurrentMode=p,dn.ContextConsumer=l,dn.ContextProvider=a,dn.Element=t,dn.ForwardRef=g,dn.Fragment=r,dn.Lazy=y,dn.Memo=b,dn.Portal=n,dn.Profiler=i,dn.StrictMode=o,dn.Suspense=_,dn.isAsyncMode=function(M){return P(M)||k(M)===u},dn.isConcurrentMode=P,dn.isContextConsumer=function(M){return k(M)===l},dn.isContextProvider=function(M){return k(M)===a},dn.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},dn.isForwardRef=function(M){return k(M)===g},dn.isFragment=function(M){return k(M)===r},dn.isLazy=function(M){return k(M)===y},dn.isMemo=function(M){return k(M)===b},dn.isPortal=function(M){return k(M)===n},dn.isProfiler=function(M){return k(M)===i},dn.isStrictMode=function(M){return k(M)===o},dn.isSuspense=function(M){return k(M)===_},dn.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===p||M===i||M===o||M===_||M===C||typeof M=="object"&&M!==null&&(M.$$typeof===y||M.$$typeof===b||M.$$typeof===a||M.$$typeof===l||M.$$typeof===g||M.$$typeof===T||M.$$typeof===O||M.$$typeof===R||M.$$typeof===v)},dn.typeOf=k,dn}var fn={};/** @license React v16.13.1
|
|
182
|
+
* react-is.development.js
|
|
183
|
+
*
|
|
184
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the MIT license found in the
|
|
187
|
+
* LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/var h0;function i4(){return h0||(h0=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function k(Oe){return typeof Oe=="string"||typeof Oe=="function"||Oe===r||Oe===p||Oe===i||Oe===o||Oe===_||Oe===C||typeof Oe=="object"&&Oe!==null&&(Oe.$$typeof===y||Oe.$$typeof===b||Oe.$$typeof===a||Oe.$$typeof===l||Oe.$$typeof===g||Oe.$$typeof===T||Oe.$$typeof===O||Oe.$$typeof===R||Oe.$$typeof===v)}function P(Oe){if(typeof Oe=="object"&&Oe!==null){var Be=Oe.$$typeof;switch(Be){case t:var ce=Oe.type;switch(ce){case u:case p:case r:case i:case o:case _:return ce;default:var le=ce&&ce.$$typeof;switch(le){case l:case g:case y:case b:case a:return le;default:return Be}}case n:return Be}}}var M=u,Y=p,X=l,oe=a,Z=t,U=g,Q=r,de=y,pe=b,te=n,fe=i,V=o,j=_,ee=!1;function ne(Oe){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(Oe)||P(Oe)===u}function B(Oe){return P(Oe)===p}function W(Oe){return P(Oe)===l}function J(Oe){return P(Oe)===a}function F(Oe){return typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===t}function w(Oe){return P(Oe)===g}function N(Oe){return P(Oe)===r}function I(Oe){return P(Oe)===y}function q(Oe){return P(Oe)===b}function ue(Oe){return P(Oe)===n}function he(Oe){return P(Oe)===i}function se(Oe){return P(Oe)===o}function Ce(Oe){return P(Oe)===_}fn.AsyncMode=M,fn.ConcurrentMode=Y,fn.ContextConsumer=X,fn.ContextProvider=oe,fn.Element=Z,fn.ForwardRef=U,fn.Fragment=Q,fn.Lazy=de,fn.Memo=pe,fn.Portal=te,fn.Profiler=fe,fn.StrictMode=V,fn.Suspense=j,fn.isAsyncMode=ne,fn.isConcurrentMode=B,fn.isContextConsumer=W,fn.isContextProvider=J,fn.isElement=F,fn.isForwardRef=w,fn.isFragment=N,fn.isLazy=I,fn.isMemo=q,fn.isPortal=ue,fn.isProfiler=he,fn.isStrictMode=se,fn.isSuspense=Ce,fn.isValidElementType=k,fn.typeOf=P}()),fn}var p0;function uT(){return p0||(p0=1,process.env.NODE_ENV==="production"?Md.exports=o4():Md.exports=i4()),Md.exports}/*
|
|
189
|
+
object-assign
|
|
190
|
+
(c) Sindre Sorhus
|
|
191
|
+
@license MIT
|
|
192
|
+
*/var Yh,g0;function a4(){if(g0)return Yh;g0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(a).map(function(g){return a[g]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(g){p[g]=g}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yh=o()?Object.assign:function(i,a){for(var l,u=r(i),p,g=1;g<arguments.length;g++){l=Object(arguments[g]);for(var _ in l)t.call(l,_)&&(u[_]=l[_]);if(e){p=e(l);for(var C=0;C<p.length;C++)n.call(l,p[C])&&(u[p[C]]=l[p[C]])}}return u},Yh}var qh,m0;function Tm(){if(m0)return qh;m0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qh=e,qh}var Zh,y0;function dT(){return y0||(y0=1,Zh=Function.call.bind(Object.prototype.hasOwnProperty)),Zh}var Jh,v0;function s4(){if(v0)return Jh;v0=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Tm(),n={},r=dT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,l,u,p){if(process.env.NODE_ENV!=="production"){for(var g in i)if(r(i,g)){var _;try{if(typeof i[g]!="function"){var C=Error((u||"React class")+": "+l+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}_=i[g](a,g,u,l,null,t)}catch(y){_=y}if(_&&!(_ instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in n)){n[_.message]=!0;var b=p?p():"";e("Failed "+l+" type: "+_.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Jh=o,Jh}var Xh,b0;function l4(){if(b0)return Xh;b0=1;var e=uT(),t=a4(),n=Tm(),r=dT(),o=s4(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return Xh=function(l,u){var p=typeof Symbol=="function"&&Symbol.iterator,g="@@iterator";function _(B){var W=B&&(p&&B[p]||B[g]);if(typeof W=="function")return W}var C="<<anonymous>>",b={array:O("array"),bigint:O("bigint"),bool:O("boolean"),func:O("function"),number:O("number"),object:O("object"),string:O("string"),symbol:O("symbol"),any:R(),arrayOf:k,element:P(),elementType:M(),instanceOf:Y,node:U(),objectOf:oe,oneOf:X,oneOfType:Z,shape:de,exact:pe};function y(B,W){return B===W?B!==0||1/B===1/W:B!==B&&W!==W}function v(B,W){this.message=B,this.data=W&&typeof W=="object"?W:{},this.stack=""}v.prototype=Error.prototype;function T(B){if(process.env.NODE_ENV!=="production")var W={},J=0;function F(N,I,q,ue,he,se,Ce){if(ue=ue||C,se=se||q,Ce!==n){if(u){var Oe=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Oe.name="Invariant Violation",Oe}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Be=ue+":"+q;!W[Be]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[Be]=!0,J++)}}return I[q]==null?N?I[q]===null?new v("The "+he+" `"+se+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new v("The "+he+" `"+se+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:B(I,q,ue,he,se)}var w=F.bind(null,!1);return w.isRequired=F.bind(null,!0),w}function O(B){function W(J,F,w,N,I,q){var ue=J[F],he=V(ue);if(he!==B){var se=j(ue);return new v("Invalid "+N+" `"+I+"` of type "+("`"+se+"` supplied to `"+w+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return T(W)}function R(){return T(a)}function k(B){function W(J,F,w,N,I){if(typeof B!="function")return new v("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var q=J[F];if(!Array.isArray(q)){var ue=V(q);return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an array."))}for(var he=0;he<q.length;he++){var se=B(q,he,w,N,I+"["+he+"]",n);if(se instanceof Error)return se}return null}return T(W)}function P(){function B(W,J,F,w,N){var I=W[J];if(!l(I)){var q=V(I);return new v("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement."))}return null}return T(B)}function M(){function B(W,J,F,w,N){var I=W[J];if(!e.isValidElementType(I)){var q=V(I);return new v("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement type."))}return null}return T(B)}function Y(B){function W(J,F,w,N,I){if(!(J[F]instanceof B)){var q=B.name||C,ue=ne(J[F]);return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected ")+("instance of `"+q+"`."))}return null}return T(W)}function X(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function W(J,F,w,N,I){for(var q=J[F],ue=0;ue<B.length;ue++)if(y(q,B[ue]))return null;var he=JSON.stringify(B,function(Ce,Oe){var Be=j(Oe);return Be==="symbol"?String(Oe):Oe});return new v("Invalid "+N+" `"+I+"` of value `"+String(q)+"` "+("supplied to `"+w+"`, expected one of "+he+"."))}return T(W)}function oe(B){function W(J,F,w,N,I){if(typeof B!="function")return new v("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var q=J[F],ue=V(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an object."));for(var he in q)if(r(q,he)){var se=B(q,he,w,N,I+"."+he,n);if(se instanceof Error)return se}return null}return T(W)}function Z(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<B.length;W++){var J=B[W];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(J)+" at index "+W+"."),a}function F(w,N,I,q,ue){for(var he=[],se=0;se<B.length;se++){var Ce=B[se],Oe=Ce(w,N,I,q,ue,n);if(Oe==null)return null;Oe.data&&r(Oe.data,"expectedType")&&he.push(Oe.data.expectedType)}var Be=he.length>0?", expected one of type ["+he.join(", ")+"]":"";return new v("Invalid "+q+" `"+ue+"` supplied to "+("`"+I+"`"+Be+"."))}return T(F)}function U(){function B(W,J,F,w,N){return te(W[J])?null:new v("Invalid "+w+" `"+N+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return T(B)}function Q(B,W,J,F,w){return new v((B||"React class")+": "+W+" type `"+J+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+w+"`.")}function de(B){function W(J,F,w,N,I){var q=J[F],ue=V(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));for(var he in B){var se=B[he];if(typeof se!="function")return Q(w,N,I,he,j(se));var Ce=se(q,he,w,N,I+"."+he,n);if(Ce)return Ce}return null}return T(W)}function pe(B){function W(J,F,w,N,I){var q=J[F],ue=V(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));var he=t({},J[F],B);for(var se in he){var Ce=B[se];if(r(B,se)&&typeof Ce!="function")return Q(w,N,I,se,j(Ce));if(!Ce)return new v("Invalid "+N+" `"+I+"` key `"+se+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(J[F],null," ")+`
|
|
193
|
+
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Oe=Ce(q,se,w,N,I+"."+se,n);if(Oe)return Oe}return null}return T(W)}function te(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(te);if(B===null||l(B))return!0;var W=_(B);if(W){var J=W.call(B),F;if(W!==B.entries){for(;!(F=J.next()).done;)if(!te(F.value))return!1}else for(;!(F=J.next()).done;){var w=F.value;if(w&&!te(w[1]))return!1}}else return!1;return!0;default:return!1}}function fe(B,W){return B==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function V(B){var W=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":fe(W,B)?"symbol":W}function j(B){if(typeof B>"u"||B===null)return""+B;var W=V(B);if(W==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return W}function ee(B){var W=j(B);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function ne(B){return!B.constructor||!B.constructor.name?C:B.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},Xh}var Qh,_0;function c4(){if(_0)return Qh;_0=1;var e=Tm();function t(){}function n(){}return n.resetWarningCache=t,Qh=function(){function r(a,l,u,p,g,_){if(_!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Qh}if(process.env.NODE_ENV!=="production"){var u4=uT(),d4=!0;og.exports=l4()(u4.isElement,d4)}else og.exports=c4()();var f4=og.exports;const ct=PO(f4);function h4(){this.__data__=[],this.size=0}function Gu(e,t){return e===t||e!==e&&t!==t}function Kf(e,t){for(var n=e.length;n--;)if(Gu(e[n][0],t))return n;return-1}var p4=Array.prototype,g4=p4.splice;function m4(e){var t=this.__data__,n=Kf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():g4.call(t,n,1),--this.size,!0}function y4(e){var t=this.__data__,n=Kf(t,e);return n<0?void 0:t[n][1]}function v4(e){return Kf(this.__data__,e)>-1}function b4(e,t){var n=this.__data__,r=Kf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ta(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ta.prototype.clear=h4;ta.prototype.delete=m4;ta.prototype.get=y4;ta.prototype.has=v4;ta.prototype.set=b4;function _4(){this.__data__=new ta,this.size=0}function x4(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function E4(e){return this.__data__.get(e)}function C4(e){return this.__data__.has(e)}var fT=typeof global=="object"&&global&&global.Object===Object&&global,w4=typeof self=="object"&&self&&self.Object===Object&&self,Zo=fT||w4||Function("return this")(),ja=Zo.Symbol,hT=Object.prototype,T4=hT.hasOwnProperty,N4=hT.toString,lu=ja?ja.toStringTag:void 0;function S4(e){var t=T4.call(e,lu),n=e[lu];try{e[lu]=void 0;var r=!0}catch{}var o=N4.call(e);return r&&(t?e[lu]=n:delete e[lu]),o}var O4=Object.prototype,A4=O4.toString;function R4(e){return A4.call(e)}var $4="[object Null]",D4="[object Undefined]",x0=ja?ja.toStringTag:void 0;function Os(e){return e==null?e===void 0?D4:$4:x0&&x0 in Object(e)?S4(e):R4(e)}function Co(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var k4="[object AsyncFunction]",M4="[object Function]",P4="[object GeneratorFunction]",I4="[object Proxy]";function Nm(e){if(!Co(e))return!1;var t=Os(e);return t==M4||t==P4||t==k4||t==I4}var ep=Zo["__core-js_shared__"],E0=function(){var e=/[^.]+$/.exec(ep&&ep.keys&&ep.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function L4(e){return!!E0&&E0 in e}var F4=Function.prototype,j4=F4.toString;function As(e){if(e!=null){try{return j4.call(e)}catch{}try{return e+""}catch{}}return""}var B4=/[\\^$.*+?()[\]{}|]/g,W4=/^\[object .+?Constructor\]$/,z4=Function.prototype,H4=Object.prototype,G4=z4.toString,K4=H4.hasOwnProperty,U4=RegExp("^"+G4.call(K4).replace(B4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V4(e){if(!Co(e)||L4(e))return!1;var t=Nm(e)?U4:W4;return t.test(As(e))}function Y4(e,t){return e==null?void 0:e[t]}function Rs(e,t){var n=Y4(e,t);return V4(n)?n:void 0}var Au=Rs(Zo,"Map"),Ru=Rs(Object,"create");function q4(){this.__data__=Ru?Ru(null):{},this.size=0}function Z4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var J4="__lodash_hash_undefined__",X4=Object.prototype,Q4=X4.hasOwnProperty;function e6(e){var t=this.__data__;if(Ru){var n=t[e];return n===J4?void 0:n}return Q4.call(t,e)?t[e]:void 0}var t6=Object.prototype,n6=t6.hasOwnProperty;function r6(e){var t=this.__data__;return Ru?t[e]!==void 0:n6.call(t,e)}var o6="__lodash_hash_undefined__";function i6(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ru&&t===void 0?o6:t,this}function ws(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ws.prototype.clear=q4;ws.prototype.delete=Z4;ws.prototype.get=e6;ws.prototype.has=r6;ws.prototype.set=i6;function a6(){this.size=0,this.__data__={hash:new ws,map:new(Au||ta),string:new ws}}function s6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Uf(e,t){var n=e.__data__;return s6(t)?n[typeof t=="string"?"string":"hash"]:n.map}function l6(e){var t=Uf(this,e).delete(e);return this.size-=t?1:0,t}function c6(e){return Uf(this,e).get(e)}function u6(e){return Uf(this,e).has(e)}function d6(e,t){var n=Uf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function na(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}na.prototype.clear=a6;na.prototype.delete=l6;na.prototype.get=c6;na.prototype.has=u6;na.prototype.set=d6;var f6=200;function h6(e,t){var n=this.__data__;if(n instanceof ta){var r=n.__data__;if(!Au||r.length<f6-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new na(r)}return n.set(e,t),this.size=n.size,this}function _i(e){var t=this.__data__=new ta(e);this.size=t.size}_i.prototype.clear=_4;_i.prototype.delete=x4;_i.prototype.get=E4;_i.prototype.has=C4;_i.prototype.set=h6;var gf=function(){try{var e=Rs(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Sm(e,t,n){t=="__proto__"&&gf?gf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ig(e,t,n){(n!==void 0&&!Gu(e[t],n)||n===void 0&&!(t in e))&&Sm(e,t,n)}function p6(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[++o];if(n(i[u],u,i)===!1)break}return t}}var pT=p6(),gT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,C0=gT&&typeof module=="object"&&module&&!module.nodeType&&module,g6=C0&&C0.exports===gT,w0=g6?Zo.Buffer:void 0;w0&&w0.allocUnsafe;function m6(e,t){return e.slice()}var mf=Zo.Uint8Array;function y6(e){var t=new e.constructor(e.byteLength);return new mf(t).set(new mf(e)),t}function v6(e,t){var n=y6(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function b6(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var T0=Object.create,_6=function(){function e(){}return function(t){if(!Co(t))return{};if(T0)return T0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function mT(e,t){return function(n){return e(t(n))}}var yT=mT(Object.getPrototypeOf,Object),x6=Object.prototype;function Om(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||x6;return e===n}function E6(e){return typeof e.constructor=="function"&&!Om(e)?_6(yT(e)):{}}function Ba(e){return e!=null&&typeof e=="object"}var C6="[object Arguments]";function N0(e){return Ba(e)&&Os(e)==C6}var vT=Object.prototype,w6=vT.hasOwnProperty,T6=vT.propertyIsEnumerable,yf=N0(function(){return arguments}())?N0:function(e){return Ba(e)&&w6.call(e,"callee")&&!T6.call(e,"callee")},co=Array.isArray,N6=9007199254740991;function Am(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=N6}function fc(e){return e!=null&&Am(e.length)&&!Nm(e)}function S6(e){return Ba(e)&&fc(e)}function O6(){return!1}var bT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,S0=bT&&typeof module=="object"&&module&&!module.nodeType&&module,A6=S0&&S0.exports===bT,O0=A6?Zo.Buffer:void 0,R6=O0?O0.isBuffer:void 0,vf=R6||O6,$6="[object Object]",D6=Function.prototype,k6=Object.prototype,_T=D6.toString,M6=k6.hasOwnProperty,P6=_T.call(Object);function I6(e){if(!Ba(e)||Os(e)!=$6)return!1;var t=yT(e);if(t===null)return!0;var n=M6.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_T.call(n)==P6}var L6="[object Arguments]",F6="[object Array]",j6="[object Boolean]",B6="[object Date]",W6="[object Error]",z6="[object Function]",H6="[object Map]",G6="[object Number]",K6="[object Object]",U6="[object RegExp]",V6="[object Set]",Y6="[object String]",q6="[object WeakMap]",Z6="[object ArrayBuffer]",J6="[object DataView]",X6="[object Float32Array]",Q6="[object Float64Array]",eG="[object Int8Array]",tG="[object Int16Array]",nG="[object Int32Array]",rG="[object Uint8Array]",oG="[object Uint8ClampedArray]",iG="[object Uint16Array]",aG="[object Uint32Array]",Sn={};Sn[X6]=Sn[Q6]=Sn[eG]=Sn[tG]=Sn[nG]=Sn[rG]=Sn[oG]=Sn[iG]=Sn[aG]=!0;Sn[L6]=Sn[F6]=Sn[Z6]=Sn[j6]=Sn[J6]=Sn[B6]=Sn[W6]=Sn[z6]=Sn[H6]=Sn[G6]=Sn[K6]=Sn[U6]=Sn[V6]=Sn[Y6]=Sn[q6]=!1;function sG(e){return Ba(e)&&Am(e.length)&&!!Sn[Os(e)]}function lG(e){return function(t){return e(t)}}var xT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cu=xT&&typeof module=="object"&&module&&!module.nodeType&&module,cG=Cu&&Cu.exports===xT,tp=cG&&fT.process,A0=function(){try{var e=Cu&&Cu.require&&Cu.require("util").types;return e||tp&&tp.binding&&tp.binding("util")}catch{}}(),R0=A0&&A0.isTypedArray,Rm=R0?lG(R0):sG;function ag(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var uG=Object.prototype,dG=uG.hasOwnProperty;function fG(e,t,n){var r=e[t];(!(dG.call(e,t)&&Gu(r,n))||n===void 0&&!(t in e))&&Sm(e,t,n)}function hG(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=void 0;u===void 0&&(u=e[l]),o?Sm(n,l,u):fG(n,l,u)}return n}function pG(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var gG=9007199254740991,mG=/^(?:0|[1-9]\d*)$/;function $m(e,t){var n=typeof e;return t=t??gG,!!t&&(n=="number"||n!="symbol"&&mG.test(e))&&e>-1&&e%1==0&&e<t}var yG=Object.prototype,vG=yG.hasOwnProperty;function ET(e,t){var n=co(e),r=!n&&yf(e),o=!n&&!r&&vf(e),i=!n&&!r&&!o&&Rm(e),a=n||r||o||i,l=a?pG(e.length,String):[],u=l.length;for(var p in e)(t||vG.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||$m(p,u)))&&l.push(p);return l}function bG(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var _G=Object.prototype,xG=_G.hasOwnProperty;function EG(e){if(!Co(e))return bG(e);var t=Om(e),n=[];for(var r in e)r=="constructor"&&(t||!xG.call(e,r))||n.push(r);return n}function CT(e){return fc(e)?ET(e,!0):EG(e)}function CG(e){return hG(e,CT(e))}function wG(e,t,n,r,o,i,a){var l=ag(e,n),u=ag(t,n),p=a.get(u);if(p){ig(e,n,p);return}var g=i?i(l,u,n+"",e,t,a):void 0,_=g===void 0;if(_){var C=co(u),b=!C&&vf(u),y=!C&&!b&&Rm(u);g=u,C||b||y?co(l)?g=l:S6(l)?g=b6(l):b?(_=!1,g=m6(u)):y?(_=!1,g=v6(u)):g=[]:I6(u)||yf(u)?(g=l,yf(l)?g=CG(l):(!Co(l)||Nm(l))&&(g=E6(u))):_=!1}_&&(a.set(u,g),o(g,u,r,i,a),a.delete(u)),ig(e,n,g)}function wT(e,t,n,r,o){e!==t&&pT(t,function(i,a){if(o||(o=new _i),Co(i))wG(e,t,a,n,wT,r,o);else{var l=r?r(ag(e,a),i,a+"",e,t,o):void 0;l===void 0&&(l=i),ig(e,a,l)}},CT)}function Vf(e){return e}function TG(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var $0=Math.max;function NG(e,t,n){return t=$0(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=$0(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),TG(e,this,l)}}function SG(e){return function(){return e}}var OG=gf?function(e,t){return gf(e,"toString",{configurable:!0,enumerable:!1,value:SG(t),writable:!0})}:Vf,AG=800,RG=16,$G=Date.now;function DG(e){var t=0,n=0;return function(){var r=$G(),o=RG-(r-n);if(n=r,o>0){if(++t>=AG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var kG=DG(OG);function MG(e,t){return kG(NG(e,t,Vf),e+"")}function PG(e,t,n){if(!Co(n))return!1;var r=typeof t;return(r=="number"?fc(n)&&$m(t,n.length):r=="string"&&t in n)?Gu(n[t],e):!1}function IG(e){return MG(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&PG(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,i)}return t})}var Ur=IG(function(e,t,n){wT(e,t,n)}),Ku=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,l=a===void 0?{}:a,u=zt(Ur({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},l),{"zDepth-1":n===1});return H.createElement("div",{style:u.wrap},H.createElement("div",{style:u.bg}),H.createElement("div",{style:u.content},i))};Ku.propTypes={background:ct.string,zDepth:ct.oneOf([0,1,2,3,4,5]),radius:ct.number,styles:ct.object};Ku.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var np=function(){return Zo.Date.now()},LG=/\s/;function FG(e){for(var t=e.length;t--&&LG.test(e.charAt(t)););return t}var jG=/^\s+/;function BG(e){return e&&e.slice(0,FG(e)+1).replace(jG,"")}var WG="[object Symbol]";function Yf(e){return typeof e=="symbol"||Ba(e)&&Os(e)==WG}var D0=NaN,zG=/^[-+]0x[0-9a-f]+$/i,HG=/^0b[01]+$/i,GG=/^0o[0-7]+$/i,KG=parseInt;function k0(e){if(typeof e=="number")return e;if(Yf(e))return D0;if(Co(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Co(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=BG(e);var n=HG.test(e);return n||GG.test(e)?KG(e.slice(2),n?2:8):zG.test(e)?D0:+e}var UG="Expected a function",VG=Math.max,YG=Math.min;function TT(e,t,n){var r,o,i,a,l,u,p=0,g=!1,_=!1,C=!0;if(typeof e!="function")throw new TypeError(UG);t=k0(t)||0,Co(n)&&(g=!!n.leading,_="maxWait"in n,i=_?VG(k0(n.maxWait)||0,t):i,C="trailing"in n?!!n.trailing:C);function b(Y){var X=r,oe=o;return r=o=void 0,p=Y,a=e.apply(oe,X),a}function y(Y){return p=Y,l=setTimeout(O,t),g?b(Y):a}function v(Y){var X=Y-u,oe=Y-p,Z=t-X;return _?YG(Z,i-oe):Z}function T(Y){var X=Y-u,oe=Y-p;return u===void 0||X>=t||X<0||_&&oe>=i}function O(){var Y=np();if(T(Y))return R(Y);l=setTimeout(O,v(Y))}function R(Y){return l=void 0,C&&r?b(Y):(r=o=void 0,a)}function k(){l!==void 0&&clearTimeout(l),p=0,r=u=o=l=void 0}function P(){return l===void 0?a:R(np())}function M(){var Y=np(),X=T(Y);if(r=arguments,o=this,u=Y,X){if(l===void 0)return y(u);if(_)return clearTimeout(l),l=setTimeout(O,t),b(u)}return l===void 0&&(l=setTimeout(O,t)),a}return M.cancel=k,M.flush=P,M}var qG="Expected a function";function ZG(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(qG);return Co(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),TT(e,t,{leading:r,maxWait:t,trailing:o})}var JG=function(t,n,r){var o=r.getBoundingClientRect(),i=o.width,a=o.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(r.getBoundingClientRect().left+window.pageXOffset),g=u-(r.getBoundingClientRect().top+window.pageYOffset);p<0?p=0:p>i&&(p=i),g<0?g=0:g>a&&(g=a);var _=p/i,C=1-g/a;return{h:n.h,s:_,v:C,a:n.a,source:"hsv"}},XG=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function QG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function t8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var qf=function(e){t8(t,e);function t(n){QG(this,t);var r=e8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(o){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,JG(o,r.props.hsl,r.container),o)},r.handleMouseDown=function(o){r.handleChange(o);var i=r.getContainerRenderWindow();i.addEventListener("mousemove",r.handleChange),i.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=ZG(function(o,i,a){o(i,a)},50),r}return XG(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,o=window;!o.document.contains(r)&&o.parent!==o;)o=o.parent;return o}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.style||{},i=o.color,a=o.white,l=o.black,u=o.pointer,p=o.circle,g=zt({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
194
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:a,black:l,pointer:u,circle:p}},{custom:!!this.props.style});return H.createElement("div",{style:g.color,ref:function(C){return r.container=C},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
|
|
195
|
+
.saturation-white {
|
|
196
|
+
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
197
|
+
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
198
|
+
}
|
|
199
|
+
.saturation-black {
|
|
200
|
+
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
201
|
+
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
202
|
+
}
|
|
203
|
+
`),H.createElement("div",{style:g.white,className:"saturation-white"},H.createElement("div",{style:g.black,className:"saturation-black"}),H.createElement("div",{style:g.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:g.circle}))))}}]),t}(H.PureComponent||H.Component);function n8(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var r8=mT(Object.keys,Object),o8=Object.prototype,i8=o8.hasOwnProperty;function a8(e){if(!Om(e))return r8(e);var t=[];for(var n in Object(e))i8.call(e,n)&&n!="constructor"&&t.push(n);return t}function Dm(e){return fc(e)?ET(e):a8(e)}function s8(e,t){return e&&pT(e,t,Dm)}function l8(e,t){return function(n,r){if(n==null)return n;if(!fc(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var NT=l8(s8);function c8(e){return typeof e=="function"?e:Vf}function u8(e,t){var n=co(e)?n8:NT;return n(e,c8(t))}function bf(e){"@babel/helpers - typeof";return bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bf(e)}var d8=/^\s+/,f8=/\s+$/;function Ot(e,t){if(e=e||"",t=t||{},e instanceof Ot)return e;if(!(this instanceof Ot))return new Ot(e,t);var n=h8(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Ot.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,i,a,l;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=ST(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=P0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=P0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=M0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=M0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return I0(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return y8(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Dn(this._r,255)*100)+"%",g:Math.round(Dn(this._g,255)*100)+"%",b:Math.round(Dn(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Dn(this._r,255)*100)+"%, "+Math.round(Dn(this._g,255)*100)+"%, "+Math.round(Dn(this._b,255)*100)+"%)":"rgba("+Math.round(Dn(this._r,255)*100)+"%, "+Math.round(Dn(this._g,255)*100)+"%, "+Math.round(Dn(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:A8[I0(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+L0(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var i=Ot(t);r="#"+L0(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Ot(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(x8,arguments)},brighten:function(){return this._applyModification(E8,arguments)},darken:function(){return this._applyModification(C8,arguments)},desaturate:function(){return this._applyModification(v8,arguments)},saturate:function(){return this._applyModification(b8,arguments)},greyscale:function(){return this._applyModification(_8,arguments)},spin:function(){return this._applyModification(w8,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(S8,arguments)},complement:function(){return this._applyCombination(T8,arguments)},monochromatic:function(){return this._applyCombination(O8,arguments)},splitcomplement:function(){return this._applyCombination(N8,arguments)},triad:function(){return this._applyCombination(F0,[3])},tetrad:function(){return this._applyCombination(F0,[4])}};Ot.fromRatio=function(e,t){if(bf(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=bu(e[r]));e=n}return Ot(e,t)};function h8(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=k8(e)),bf(e)=="object"&&(Hi(e.r)&&Hi(e.g)&&Hi(e.b)?(t=p8(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Hi(e.h)&&Hi(e.s)&&Hi(e.v)?(r=bu(e.s),o=bu(e.v),t=m8(e.h,r,o),a=!0,l="hsv"):Hi(e.h)&&Hi(e.s)&&Hi(e.l)&&(r=bu(e.s),i=bu(e.l),t=g8(e.h,r,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=ST(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function p8(e,t,n){return{r:Dn(e,255)*255,g:Dn(t,255)*255,b:Dn(n,255)*255}}function M0(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=(r+o)/2;if(r==o)i=a=0;else{var u=r-o;switch(a=l>.5?u/(2-r-o):u/(r+o),r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,l}}function g8(e,t,n){var r,o,i;e=Dn(e,360),t=Dn(t,100),n=Dn(n,100);function a(p,g,_){return _<0&&(_+=1),_>1&&(_-=1),_<1/6?p+(g-p)*6*_:_<1/2?g:_<2/3?p+(g-p)*(2/3-_)*6:p}if(t===0)r=o=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=a(u,l,e+1/3),o=a(u,l,e),i=a(u,l,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function P0(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=r,u=r-o;if(a=r===0?0:u/r,r==o)i=0;else{switch(r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,v:l}}function m8(e,t,n){e=Dn(e,360)*6,t=Dn(t,100),n=Dn(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),u=r%6,p=[n,a,i,i,l,n][u],g=[l,n,n,a,i,i][u],_=[i,i,l,n,n,a][u];return{r:p*255,g:g*255,b:_*255}}function I0(e,t,n,r){var o=[zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function y8(e,t,n,r,o){var i=[zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16)),zo(OT(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function L0(e,t,n,r){var o=[zo(OT(r)),zo(Math.round(e).toString(16)),zo(Math.round(t).toString(16)),zo(Math.round(n).toString(16))];return o.join("")}Ot.equals=function(e,t){return!e||!t?!1:Ot(e).toRgbString()==Ot(t).toRgbString()};Ot.random=function(){return Ot.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function v8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s-=t/100,n.s=Zf(n.s),Ot(n)}function b8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s+=t/100,n.s=Zf(n.s),Ot(n)}function _8(e){return Ot(e).desaturate(100)}function x8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l+=t/100,n.l=Zf(n.l),Ot(n)}function E8(e,t){t=t===0?0:t||10;var n=Ot(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),Ot(n)}function C8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l-=t/100,n.l=Zf(n.l),Ot(n)}function w8(e,t){var n=Ot(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Ot(n)}function T8(e){var t=Ot(e).toHsl();return t.h=(t.h+180)%360,Ot(t)}function F0(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Ot(e).toHsl(),r=[Ot(e)],o=360/t,i=1;i<t;i++)r.push(Ot({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function N8(e){var t=Ot(e).toHsl(),n=t.h;return[Ot(e),Ot({h:(n+72)%360,s:t.s,l:t.l}),Ot({h:(n+216)%360,s:t.s,l:t.l})]}function S8(e,t,n){t=t||6,n=n||30;var r=Ot(e).toHsl(),o=360/n,i=[Ot(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(Ot(r));return i}function O8(e,t){t=t||6;for(var n=Ot(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(Ot({h:r,s:o,v:i})),i=(i+l)%1;return a}Ot.mix=function(e,t,n){n=n===0?0:n||50;var r=Ot(e).toRgb(),o=Ot(t).toRgb(),i=n/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return Ot(a)};Ot.readability=function(e,t){var n=Ot(e),r=Ot(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};Ot.isReadable=function(e,t,n){var r=Ot.readability(e,t),o,i;switch(i=!1,o=M8(n),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i};Ot.mostReadable=function(e,t,n){var r=null,o=0,i,a,l,u;n=n||{},a=n.includeFallbackColors,l=n.level,u=n.size;for(var p=0;p<t.length;p++)i=Ot.readability(e,t[p]),i>o&&(o=i,r=Ot(t[p]));return Ot.isReadable(e,r,{level:l,size:u})||!a?r:(n.includeFallbackColors=!1,Ot.mostReadable(e,["#fff","#000"],n))};var sg=Ot.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},A8=Ot.hexNames=R8(sg);function R8(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function ST(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Dn(e,t){$8(e)&&(e="100%");var n=D8(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Zf(e){return Math.min(1,Math.max(0,e))}function no(e){return parseInt(e,16)}function $8(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function D8(e){return typeof e=="string"&&e.indexOf("%")!=-1}function zo(e){return e.length==1?"0"+e:""+e}function bu(e){return e<=1&&(e=e*100+"%"),e}function OT(e){return Math.round(parseFloat(e)*255).toString(16)}function j0(e){return no(e)/255}var Bo=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Hi(e){return!!Bo.CSS_UNIT.exec(e)}function k8(e){e=e.replace(d8,"").replace(f8,"").toLowerCase();var t=!1;if(sg[e])e=sg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Bo.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Bo.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Bo.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Bo.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Bo.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Bo.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Bo.hex8.exec(e))?{r:no(n[1]),g:no(n[2]),b:no(n[3]),a:j0(n[4]),format:t?"name":"hex8"}:(n=Bo.hex6.exec(e))?{r:no(n[1]),g:no(n[2]),b:no(n[3]),format:t?"name":"hex"}:(n=Bo.hex4.exec(e))?{r:no(n[1]+""+n[1]),g:no(n[2]+""+n[2]),b:no(n[3]+""+n[3]),a:j0(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Bo.hex3.exec(e))?{r:no(n[1]+""+n[1]),g:no(n[2]+""+n[2]),b:no(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function M8(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var B0=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return u8(n,function(i){if(t[i]&&(r+=1,isNaN(t[i])||(o+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(t[i])&&(o+=1)}}),r===o?t:!1},_u=function(t,n){var r=t.hex?Ot(t.hex):Ot(t),o=r.toHsl(),i=r.toHsv(),a=r.toRgb(),l=r.toHex();o.s===0&&(o.h=n||0,i.h=n||0);var u=l==="000000"&&a.a===0;return{hsl:o,hex:u?"transparent":"#"+l,rgb:a,hsv:i,oldHue:t.h||n||o.h,source:t.source}},Wa=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&Ot(t).isValid()},km=function(t){if(!t)return"#fff";var n=_u(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},rp=function(t,n){var r=t.replace("°","");return Ot(n+" ("+r+")")._ok},cu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function I8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function F8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Vr=function(t){var n=function(r){F8(o,r);function o(i){I8(this,o);var a=L8(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return a.handleChange=function(l,u){var p=B0(l);if(p){var g=_u(l,l.h||a.state.oldHue);a.setState(g),a.props.onChangeComplete&&a.debounce(a.props.onChangeComplete,g,u),a.props.onChange&&a.props.onChange(g,u)}},a.handleSwatchHover=function(l,u){var p=B0(l);if(p){var g=_u(l,l.h||a.state.oldHue);a.props.onSwatchHover&&a.props.onSwatchHover(g,u)}},a.state=cu({},_u(i.color,0)),a.debounce=TT(function(l,u,p){l(u,p)},100),a}return P8(o,[{key:"render",value:function(){var a={};return this.props.onSwatchHover&&(a.onSwatchHover=this.handleSwatchHover),H.createElement(t,cu({},this.props,this.state,{onChange:this.handleChange},a))}}],[{key:"getDerivedStateFromProps",value:function(a,l){return cu({},_u(a.color,l.oldHue))}}]),o}(H.PureComponent||H.Component);return n.propTypes=cu({},t.propTypes),n.defaultProps=cu({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},j8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function W8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function z8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var H8=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){z8(o,r);function o(){var i,a,l,u;W8(this,o);for(var p=arguments.length,g=Array(p),_=0;_<p;_++)g[_]=arguments[_];return u=(a=(l=W0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(g))),l),l.state={focus:!1},l.handleFocus=function(){return l.setState({focus:!0})},l.handleBlur=function(){return l.setState({focus:!1})},a),W0(l,u)}return B8(o,[{key:"render",value:function(){return H.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},H.createElement(t,j8({},this.props,this.state)))}}]),o}(H.Component)},z0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G8=13,K8=function(t){var n=t.color,r=t.style,o=t.onClick,i=o===void 0?function(){}:o,a=t.onHover,l=t.title,u=l===void 0?n:l,p=t.children,g=t.focus,_=t.focusStyle,C=_===void 0?{}:_,b=n==="transparent",y=zt({default:{swatch:z0({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,g?C:{})}}),v=function(P){return i(n,P)},T=function(P){return P.keyCode===G8&&i(n,P)},O=function(P){return a(n,P)},R={};return a&&(R.onMouseOver=O),H.createElement("div",z0({style:y.swatch,onClick:v,title:u,tabIndex:0,onKeyDown:T},R),p,b&&H.createElement(uc,{borderRadius:y.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const $s=H8(K8);var U8=function(t){var n=t.direction,r=zt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},V8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AT=function(t){var n=t.rgb,r=t.hsl,o=t.width,i=t.height,a=t.onChange,l=t.direction,u=t.style,p=t.renderers,g=t.pointer,_=t.className,C=_===void 0?"":_,b=zt({default:{picker:{position:"relative",width:o,height:i},alpha:{radius:"2px",style:u}}});return H.createElement("div",{style:b.picker,className:"alpha-picker "+C},H.createElement(wm,V8({},b.alpha,{rgb:n,hsl:r,pointer:g,renderers:p,onChange:a,direction:l})))};AT.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:U8};Vr(AT);function RT(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Y8="__lodash_hash_undefined__";function q8(e){return this.__data__.set(e,Y8),this}function Z8(e){return this.__data__.has(e)}function _f(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new na;++t<n;)this.add(e[t])}_f.prototype.add=_f.prototype.push=q8;_f.prototype.has=Z8;function J8(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function X8(e,t){return e.has(t)}var Q8=1,eK=2;function $T(e,t,n,r,o,i){var a=n&Q8,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),g=i.get(t);if(p&&g)return p==t&&g==e;var _=-1,C=!0,b=n&eK?new _f:void 0;for(i.set(e,t),i.set(t,e);++_<l;){var y=e[_],v=t[_];if(r)var T=a?r(v,y,_,t,e,i):r(y,v,_,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(b){if(!J8(t,function(O,R){if(!X8(b,R)&&(y===O||o(y,O,n,r,i)))return b.push(R)})){C=!1;break}}else if(!(y===v||o(y,v,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}function tK(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function nK(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var rK=1,oK=2,iK="[object Boolean]",aK="[object Date]",sK="[object Error]",lK="[object Map]",cK="[object Number]",uK="[object RegExp]",dK="[object Set]",fK="[object String]",hK="[object Symbol]",pK="[object ArrayBuffer]",gK="[object DataView]",H0=ja?ja.prototype:void 0,op=H0?H0.valueOf:void 0;function mK(e,t,n,r,o,i,a){switch(n){case gK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pK:return!(e.byteLength!=t.byteLength||!i(new mf(e),new mf(t)));case iK:case aK:case cK:return Gu(+e,+t);case sK:return e.name==t.name&&e.message==t.message;case uK:case fK:return e==t+"";case lK:var l=tK;case dK:var u=r&rK;if(l||(l=nK),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=oK,a.set(e,t);var g=$T(l(e),l(t),r,o,i,a);return a.delete(e),g;case hK:if(op)return op.call(e)==op.call(t)}return!1}function yK(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function vK(e,t,n){var r=t(e);return co(e)?r:yK(r,n(e))}function bK(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function _K(){return[]}var xK=Object.prototype,EK=xK.propertyIsEnumerable,G0=Object.getOwnPropertySymbols,CK=G0?function(e){return e==null?[]:(e=Object(e),bK(G0(e),function(t){return EK.call(e,t)}))}:_K;function K0(e){return vK(e,Dm,CK)}var wK=1,TK=Object.prototype,NK=TK.hasOwnProperty;function SK(e,t,n,r,o,i){var a=n&wK,l=K0(e),u=l.length,p=K0(t),g=p.length;if(u!=g&&!a)return!1;for(var _=u;_--;){var C=l[_];if(!(a?C in t:NK.call(t,C)))return!1}var b=i.get(e),y=i.get(t);if(b&&y)return b==t&&y==e;var v=!0;i.set(e,t),i.set(t,e);for(var T=a;++_<u;){C=l[_];var O=e[C],R=t[C];if(r)var k=a?r(R,O,C,t,e,i):r(O,R,C,e,t,i);if(!(k===void 0?O===R||o(O,R,n,r,i):k)){v=!1;break}T||(T=C=="constructor")}if(v&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var lg=Rs(Zo,"DataView"),cg=Rs(Zo,"Promise"),ug=Rs(Zo,"Set"),dg=Rs(Zo,"WeakMap"),U0="[object Map]",OK="[object Object]",V0="[object Promise]",Y0="[object Set]",q0="[object WeakMap]",Z0="[object DataView]",AK=As(lg),RK=As(Au),$K=As(cg),DK=As(ug),kK=As(dg),Ra=Os;(lg&&Ra(new lg(new ArrayBuffer(1)))!=Z0||Au&&Ra(new Au)!=U0||cg&&Ra(cg.resolve())!=V0||ug&&Ra(new ug)!=Y0||dg&&Ra(new dg)!=q0)&&(Ra=function(e){var t=Os(e),n=t==OK?e.constructor:void 0,r=n?As(n):"";if(r)switch(r){case AK:return Z0;case RK:return U0;case $K:return V0;case DK:return Y0;case kK:return q0}return t});var MK=1,J0="[object Arguments]",X0="[object Array]",Pd="[object Object]",PK=Object.prototype,Q0=PK.hasOwnProperty;function IK(e,t,n,r,o,i){var a=co(e),l=co(t),u=a?X0:Ra(e),p=l?X0:Ra(t);u=u==J0?Pd:u,p=p==J0?Pd:p;var g=u==Pd,_=p==Pd,C=u==p;if(C&&vf(e)){if(!vf(t))return!1;a=!0,g=!1}if(C&&!g)return i||(i=new _i),a||Rm(e)?$T(e,t,n,r,o,i):mK(e,t,u,n,r,o,i);if(!(n&MK)){var b=g&&Q0.call(e,"__wrapped__"),y=_&&Q0.call(t,"__wrapped__");if(b||y){var v=b?e.value():e,T=y?t.value():t;return i||(i=new _i),o(v,T,n,r,i)}}return C?(i||(i=new _i),SK(e,t,n,r,o,i)):!1}function Mm(e,t,n,r,o){return e===t?!0:e==null||t==null||!Ba(e)&&!Ba(t)?e!==e&&t!==t:IK(e,t,n,r,Mm,o)}var LK=1,FK=2;function jK(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var l=a[0],u=e[l],p=a[1];if(a[2]){if(u===void 0&&!(l in e))return!1}else{var g=new _i,_;if(!(_===void 0?Mm(p,u,LK|FK,r,g):_))return!1}}return!0}function DT(e){return e===e&&!Co(e)}function BK(e){for(var t=Dm(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,DT(o)]}return t}function kT(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function WK(e){var t=BK(e);return t.length==1&&t[0][2]?kT(t[0][0],t[0][1]):function(n){return n===e||jK(n,e,t)}}var zK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HK=/^\w*$/;function Pm(e,t){if(co(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Yf(e)?!0:HK.test(e)||!zK.test(e)||t!=null&&e in Object(t)}var GK="Expected a function";function Im(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(GK);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Im.Cache||na),n}Im.Cache=na;var KK=500;function UK(e){var t=Im(e,function(r){return n.size===KK&&n.clear(),r}),n=t.cache;return t}var VK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,YK=/\\(\\)?/g,qK=UK(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(VK,function(n,r,o,i){t.push(o?i.replace(YK,"$1"):r||n)}),t}),ZK=1/0,eb=ja?ja.prototype:void 0,tb=eb?eb.toString:void 0;function MT(e){if(typeof e=="string")return e;if(co(e))return RT(e,MT)+"";if(Yf(e))return tb?tb.call(e):"";var t=e+"";return t=="0"&&1/e==-ZK?"-0":t}function JK(e){return e==null?"":MT(e)}function PT(e,t){return co(e)?e:Pm(e,t)?[e]:qK(JK(e))}var XK=1/0;function Jf(e){if(typeof e=="string"||Yf(e))return e;var t=e+"";return t=="0"&&1/e==-XK?"-0":t}function IT(e,t){t=PT(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Jf(t[n++])];return n&&n==r?e:void 0}function QK(e,t,n){var r=e==null?void 0:IT(e,t);return r===void 0?n:r}function eU(e,t){return e!=null&&t in Object(e)}function tU(e,t,n){t=PT(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=Jf(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&Am(o)&&$m(a,o)&&(co(e)||yf(e)))}function nU(e,t){return e!=null&&tU(e,t,eU)}var rU=1,oU=2;function iU(e,t){return Pm(e)&&DT(t)?kT(Jf(e),t):function(n){var r=QK(n,e);return r===void 0&&r===t?nU(n,e):Mm(t,r,rU|oU)}}function aU(e){return function(t){return t==null?void 0:t[e]}}function sU(e){return function(t){return IT(t,e)}}function lU(e){return Pm(e)?aU(Jf(e)):sU(e)}function cU(e){return typeof e=="function"?e:e==null?Vf:typeof e=="object"?co(e)?iU(e[0],e[1]):WK(e):lU(e)}function uU(e,t){var n=-1,r=fc(e)?Array(e.length):[];return NT(e,function(o,i,a){r[++n]=t(o,i,a)}),r}function Ds(e,t){var n=co(e)?RT:uU;return n(e,cU(t))}var dU=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=zt({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return H.createElement("div",{style:i.swatches},Ds(n,function(a){return H.createElement($s,{key:a,color:a,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+a}})}),H.createElement("div",{style:i.clear}))},Lm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,g=t.className,_=g===void 0?"":g,C=o==="transparent",b=function(T,O){Wa(T)&&n({hex:T,source:"hex"},O)},y=zt(Ur({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:km(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},p),{"hide-triangle":l==="hide"});return H.createElement("div",{style:y.card,className:"block-picker "+_},H.createElement("div",{style:y.triangle}),H.createElement("div",{style:y.head},C&&H.createElement(uc,{borderRadius:"6px 6px 0 0"}),H.createElement("div",{style:y.label},o)),H.createElement("div",{style:y.body},H.createElement(dU,{colors:i,onClick:b,onSwatchHover:r}),H.createElement(en,{style:{input:y.input},value:o,onChange:b})))};Lm.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["top","hide"]),styles:ct.object};Lm.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Vr(Lm);var xl={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},El={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Cl={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},wl={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Tl={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Nl={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Sl={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Ol={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},Al={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},xu={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Rl={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},$l={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Dl={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},kl={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Ml={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Pl={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Il={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Ll={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},LT=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,i=t.hover,a=t.active,l=t.circleSize,u=t.circleSpacing,p=zt({default:{swatch:{width:l,height:l,marginRight:u,marginBottom:u,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(l/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:i,active:a});return H.createElement("div",{style:p.swatch},H.createElement($s,{style:p.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:p.Swatch.boxShadow+", 0 0 5px "+n}}))};LT.defaultProps={circleSize:28,circleSpacing:14};const fU=Cm(LT);var Fm=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,i=t.colors,a=t.hex,l=t.circleSize,u=t.styles,p=u===void 0?{}:u,g=t.circleSpacing,_=t.className,C=_===void 0?"":_,b=zt(Ur({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-g,marginBottom:-g}}},p)),y=function(T,O){return r({hex:T,source:"hex"},O)};return H.createElement("div",{style:b.card,className:"circle-picker "+C},Ds(i,function(v){return H.createElement(fU,{key:v,color:v,onClick:y,onSwatchHover:o,active:a===v.toLowerCase(),circleSize:l,circleSpacing:g})}))};Fm.propTypes={width:ct.oneOfType([ct.string,ct.number]),circleSize:ct.number,circleSpacing:ct.number,styles:ct.object};Fm.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[xl[500],El[500],Cl[500],wl[500],Tl[500],Nl[500],Sl[500],Ol[500],Al[500],xu[500],Rl[500],$l[500],Dl[500],kl[500],Ml[500],Pl[500],Il[500],Ll[500]],styles:{}};Vr(Fm);function nb(e){return e===void 0}var FT={};Object.defineProperty(FT,"__esModule",{value:!0});var rb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hU=H,ob=pU(hU);function pU(e){return e&&e.__esModule?e:{default:e}}function gU(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Id=24,mU=FT.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Id:r,i=e.height,a=i===void 0?Id:i,l=e.style,u=l===void 0?{}:l,p=gU(e,["fill","width","height","style"]);return ob.default.createElement("svg",rb({viewBox:"0 0 "+Id+" "+Id,style:rb({fill:n,width:o,height:a},u)},p),ob.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},yU=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function vU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bU(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function _U(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var jT=function(e){_U(t,e);function t(n){vU(this,t);var r=bU(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(o,i){o.hex?Wa(o.hex)&&r.props.onChange({hex:o.hex,source:"hex"},i):o.r||o.g||o.b?r.props.onChange({r:o.r||r.props.rgb.r,g:o.g||r.props.rgb.g,b:o.b||r.props.rgb.b,source:"rgb"},i):o.a?(o.a<0?o.a=0:o.a>1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},i)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(nb(o.s)?r.props.hsl.s:o.s),l:Number(nb(o.l)?r.props.hsl.l:o.l),source:"hsl"},i))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return yU(t,[{key:"render",value:function(){var r=this,o=zt({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),H.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,H.createElement("div",{style:o.toggle},H.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},H.createElement(mU,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(H.Component);jT.defaultProps={view:"hex"};var ib=function(){var t=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},xU=function(){var t=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return H.createElement("div",{style:t.picker})},jm=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,l=t.hsv,u=t.hex,p=t.renderers,g=t.styles,_=g===void 0?{}:g,C=t.className,b=C===void 0?"":C,y=t.defaultView,v=zt(Ur({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},_),{disableAlpha:o});return H.createElement("div",{style:v.picker,className:"chrome-picker "+b},H.createElement("div",{style:v.saturation},H.createElement(qf,{style:v.Saturation,hsl:a,hsv:l,pointer:xU,onChange:r})),H.createElement("div",{style:v.body},H.createElement("div",{style:v.controls,className:"flexbox-fix"},H.createElement("div",{style:v.color},H.createElement("div",{style:v.swatch},H.createElement("div",{style:v.active}),H.createElement(uc,{renderers:p}))),H.createElement("div",{style:v.toggles},H.createElement("div",{style:v.hue},H.createElement(dc,{style:v.Hue,hsl:a,pointer:ib,onChange:r})),H.createElement("div",{style:v.alpha},H.createElement(wm,{style:v.Alpha,rgb:i,hsl:a,pointer:ib,renderers:p,onChange:r})))),H.createElement(jT,{rgb:i,hsl:a,hex:u,view:y,onChange:r,disableAlpha:o})))};jm.propTypes={width:ct.oneOfType([ct.string,ct.number]),disableAlpha:ct.bool,styles:ct.object,defaultView:ct.oneOf(["hex","rgb","hsl"])};jm.defaultProps={width:225,disableAlpha:!1,styles:{}};Vr(jm);var EU=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=zt({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:km(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement($s,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:l.dot}))},CU=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=zt({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(u,p){u.r||u.g||u.b?o({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},p):o({hex:u.hex,source:"hex"},p)};return H.createElement("div",{style:i.fields,className:"flexbox-fix"},H.createElement("div",{style:i.active}),H.createElement(en,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},Bm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,l=t.styles,u=l===void 0?{}:l,p=t.className,g=p===void 0?"":p,_=zt(Ur({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},u)),C=function(y,v){y.hex?Wa(y.hex)&&n({hex:y.hex,source:"hex"},v):n(y,v)};return H.createElement(Ku,{style:_.Compact,styles:u},H.createElement("div",{style:_.compact,className:"compact-picker "+g},H.createElement("div",null,Ds(o,function(b){return H.createElement(EU,{key:b,color:b,active:b.toLowerCase()===i,onClick:C,onSwatchHover:r})}),H.createElement("div",{style:_.clear})),H.createElement(CU,{hex:i,rgb:a,onChange:C})))};Bm.propTypes={colors:ct.arrayOf(ct.string),styles:ct.object};Bm.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Vr(Bm);var wU=function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=zt({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return H.createElement("div",{style:l.swatch},H.createElement($s,{color:r,onClick:o,onHover:i,focusStyle:a}))};const TU=Cm(wU);var Wm=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,l=t.styles,u=l===void 0?{}:l,p=t.className,g=p===void 0?"":p,_=zt(Ur({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},u),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),C=function(y,v){return o({hex:y,source:"hex"},v)};return H.createElement("div",{style:_.card,className:"github-picker "+g},H.createElement("div",{style:_.triangleShadow}),H.createElement("div",{style:_.triangle}),Ds(r,function(b){return H.createElement(TU,{color:b,key:b,onClick:C,onSwatchHover:i})}))};Wm.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:ct.object};Wm.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Vr(Wm);var NU=function(t){var n=t.direction,r=zt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},SU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zm=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.hsl,a=t.direction,l=t.pointer,u=t.styles,p=u===void 0?{}:u,g=t.className,_=g===void 0?"":g,C=zt(Ur({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},p)),b=function(v){return o({a:1,h:v.h,l:.5,s:1})};return H.createElement("div",{style:C.picker,className:"hue-picker "+_},H.createElement(dc,SU({},C.hue,{hsl:i,pointer:l,onChange:b,direction:a})))};zm.propTypes={styles:ct.object};zm.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:NU,styles:{}};Vr(zm);var OU=function(t){var n=t.onChange,r=t.hex,o=t.rgb,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=zt(Ur({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),g=function(C,b){C.hex?Wa(C.hex)&&n({hex:C.hex,source:"hex"},b):(C.r||C.g||C.b)&&n({r:C.r||o.r,g:C.g||o.g,b:C.b||o.b,source:"rgb"},b)};return H.createElement(Ku,{styles:a},H.createElement("div",{style:p.material,className:"material-picker "+u},H.createElement(en,{style:{wrap:p.HEXwrap,input:p.HEXinput,label:p.HEXlabel},label:"hex",value:r,onChange:g}),H.createElement("div",{style:p.split,className:"flexbox-fix"},H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"r",value:o.r,onChange:g})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"g",value:o.g,onChange:g})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"b",value:o.b,onChange:g})))))};Vr(OU);var AU=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=zt({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),l=function(p,g){p["#"]?Wa(p["#"])&&n({hex:p["#"],source:"hex"},g):p.r||p.g||p.b?n({r:p.r||r.r,g:p.g||r.g,b:p.b||r.b,source:"rgb"},g):(p.h||p.s||p.v)&&n({h:p.h||o.h,s:p.s||o.s,v:p.v||o.v,source:"hsv"},g)};return H.createElement("div",{style:a.fields},H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(o.s*100),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(o.v*100),onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:i.replace("#",""),onChange:l}),H.createElement("div",{style:a.fieldSymbols},H.createElement("div",{style:a.symbol},"°"),H.createElement("div",{style:a.symbol},"%"),H.createElement("div",{style:a.symbol},"%")))},RU=function(t){var n=t.hsl,r=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return H.createElement("div",{style:r.picker})},$U=function(){var t=zt({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return H.createElement("div",{style:t.pointer},H.createElement("div",{style:t.left},H.createElement("div",{style:t.leftInside})),H.createElement("div",{style:t.right},H.createElement("div",{style:t.rightInside})))},ab=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=zt({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return H.createElement("div",{style:a.button,onClick:n},r||o)},DU=function(t){var n=t.rgb,r=t.currentColor,o=zt({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return H.createElement("div",null,H.createElement("div",{style:o.label},"new"),H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.new}),H.createElement("div",{style:o.current})),H.createElement("div",{style:o.label},"current"))},kU=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function MU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PU(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function IU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Hm=function(e){IU(t,e);function t(n){MU(this,t);var r=PU(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return kU(t,[{key:"render",value:function(){var r=this.props,o=r.styles,i=o===void 0?{}:o,a=r.className,l=a===void 0?"":a,u=zt(Ur({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return H.createElement("div",{style:u.picker,className:"photoshop-picker "+l},H.createElement("div",{style:u.head},this.props.header),H.createElement("div",{style:u.body,className:"flexbox-fix"},H.createElement("div",{style:u.saturation},H.createElement(qf,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:RU,onChange:this.props.onChange})),H.createElement("div",{style:u.hue},H.createElement(dc,{direction:"vertical",hsl:this.props.hsl,pointer:$U,onChange:this.props.onChange})),H.createElement("div",{style:u.controls},H.createElement("div",{style:u.top,className:"flexbox-fix"},H.createElement("div",{style:u.previews},H.createElement(DU,{rgb:this.props.rgb,currentColor:this.state.currentColor})),H.createElement("div",{style:u.actions},H.createElement(ab,{label:"OK",onClick:this.props.onAccept,active:!0}),H.createElement(ab,{label:"Cancel",onClick:this.props.onCancel}),H.createElement(AU,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(H.Component);Hm.propTypes={header:ct.string,styles:ct.object};Hm.defaultProps={header:"Color Picker",styles:{}};Vr(Hm);var LU=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,l=zt({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),u=function(g,_){g.hex?Wa(g.hex)&&n({hex:g.hex,source:"hex"},_):g.r||g.g||g.b?n({r:g.r||r.r,g:g.g||r.g,b:g.b||r.b,a:r.a,source:"rgb"},_):g.a&&(g.a<0?g.a=0:g.a>100&&(g.a=100),g.a/=100,n({h:o.h,s:o.s,l:o.l,a:g.a,source:"rgb"},_))};return H.createElement("div",{style:l.fields,className:"flexbox-fix"},H.createElement("div",{style:l.double},H.createElement(en,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:u})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.alpha},H.createElement(en,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:u,dragLabel:"true",dragMax:"100"})))},FU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BT=function(t){var n=t.colors,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=zt({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),l=function(p,g){o({hex:p,source:"hex"},g)};return H.createElement("div",{style:a.colors,className:"flexbox-fix"},n.map(function(u){var p=typeof u=="string"?{color:u}:u,g=""+p.color+(p.title||"");return H.createElement("div",{key:g,style:a.swatchWrap},H.createElement($s,FU({},p,{style:a.swatch,onClick:l,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+p.color}})))}))};BT.propTypes={colors:ct.arrayOf(ct.oneOfType([ct.string,ct.shape({color:ct.string,title:ct.string})])).isRequired};var jU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gm=function(t){var n=t.width,r=t.rgb,o=t.hex,i=t.hsv,a=t.hsl,l=t.onChange,u=t.onSwatchHover,p=t.disableAlpha,g=t.presetColors,_=t.renderers,C=t.styles,b=C===void 0?{}:C,y=t.className,v=y===void 0?"":y,T=zt(Ur({default:jU({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},b),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},b),{disableAlpha:p});return H.createElement("div",{style:T.picker,className:"sketch-picker "+v},H.createElement("div",{style:T.saturation},H.createElement(qf,{style:T.Saturation,hsl:a,hsv:i,onChange:l})),H.createElement("div",{style:T.controls,className:"flexbox-fix"},H.createElement("div",{style:T.sliders},H.createElement("div",{style:T.hue},H.createElement(dc,{style:T.Hue,hsl:a,onChange:l})),H.createElement("div",{style:T.alpha},H.createElement(wm,{style:T.Alpha,rgb:r,hsl:a,renderers:_,onChange:l}))),H.createElement("div",{style:T.color},H.createElement(uc,null),H.createElement("div",{style:T.activeColor}))),H.createElement(LU,{rgb:r,hsl:a,hex:o,onChange:l,disableAlpha:p}),H.createElement(BT,{colors:g,onClick:l,onSwatchHover:u}))};Gm.propTypes={disableAlpha:ct.bool,width:ct.oneOfType([ct.string,ct.number]),styles:ct.object};Gm.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const BU=Vr(Gm);var uu=function(t){var n=t.hsl,r=t.offset,o=t.onClick,i=o===void 0?function(){}:o,a=t.active,l=t.first,u=t.last,p=zt({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:l,last:u}),g=function(C){return i({h:n.h,s:.5,l:r,source:"hsl"},C)};return H.createElement("div",{style:p.swatch,onClick:g})},WU=function(t){var n=t.onClick,r=t.hsl,o=zt({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.swatch},H.createElement(uu,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<i&&Math.abs(r.s-.5)<i,onClick:n,first:!0})),H.createElement("div",{style:o.swatch},H.createElement(uu,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(uu,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(uu,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(uu,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<i&&Math.abs(r.s-.5)<i,onClick:n,last:!0})),H.createElement("div",{style:o.clear}))},zU=function(){var t=zt({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},Km=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=zt(Ur({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return H.createElement("div",{style:p.wrap||{},className:"slider-picker "+u},H.createElement("div",{style:p.hue},H.createElement(dc,{style:p.Hue,hsl:n,pointer:o,onChange:r})),H.createElement("div",{style:p.swatches},H.createElement(WU,{hsl:n,onClick:r})))};Km.propTypes={styles:ct.object};Km.defaultProps={pointer:zU,styles:{}};Vr(Km);var WT={};Object.defineProperty(WT,"__esModule",{value:!0});var sb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HU=H,lb=GU(HU);function GU(e){return e&&e.__esModule?e:{default:e}}function KU(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Ld=24,UU=WT.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Ld:r,i=e.height,a=i===void 0?Ld:i,l=e.style,u=l===void 0?{}:l,p=KU(e,["fill","width","height","style"]);return lb.default.createElement("svg",sb({viewBox:"0 0 "+Ld+" "+Ld,style:sb({fill:n,width:o,height:a},u)},p),lb.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},VU=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.first,l=t.last,u=t.active,p=zt({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:km(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:u,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement($s,{color:n,style:p.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:p.check},H.createElement(UU,null)))},YU=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=zt({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return H.createElement("div",{style:a.group},Ds(o,function(l,u){return H.createElement(VU,{key:l,color:l,active:l.toLowerCase()===i,first:u===0,last:u===o.length-1,onClick:n,onSwatchHover:r})}))},Um=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,l=t.hex,u=t.styles,p=u===void 0?{}:u,g=t.className,_=g===void 0?"":g,C=zt(Ur({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},p)),b=function(v,T){return o({hex:v,source:"hex"},T)};return H.createElement("div",{style:C.picker,className:"swatches-picker "+_},H.createElement(Ku,null,H.createElement("div",{style:C.overflow},H.createElement("div",{style:C.body},Ds(a,function(y){return H.createElement(YU,{key:y.toString(),group:y,active:l,onClick:b,onSwatchHover:i})}),H.createElement("div",{style:C.clear})))))};Um.propTypes={width:ct.oneOfType([ct.string,ct.number]),height:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.arrayOf(ct.string)),styles:ct.object};Um.defaultProps={width:320,height:240,colors:[[xl[900],xl[700],xl[500],xl[300],xl[100]],[El[900],El[700],El[500],El[300],El[100]],[Cl[900],Cl[700],Cl[500],Cl[300],Cl[100]],[wl[900],wl[700],wl[500],wl[300],wl[100]],[Tl[900],Tl[700],Tl[500],Tl[300],Tl[100]],[Nl[900],Nl[700],Nl[500],Nl[300],Nl[100]],[Sl[900],Sl[700],Sl[500],Sl[300],Sl[100]],[Ol[900],Ol[700],Ol[500],Ol[300],Ol[100]],[Al[900],Al[700],Al[500],Al[300],Al[100]],["#194D33",xu[700],xu[500],xu[300],xu[100]],[Rl[900],Rl[700],Rl[500],Rl[300],Rl[100]],[$l[900],$l[700],$l[500],$l[300],$l[100]],[Dl[900],Dl[700],Dl[500],Dl[300],Dl[100]],[kl[900],kl[700],kl[500],kl[300],kl[100]],[Ml[900],Ml[700],Ml[500],Ml[300],Ml[100]],[Pl[900],Pl[700],Pl[500],Pl[300],Pl[100]],[Il[900],Il[700],Il[500],Il[300],Il[100]],[Ll[900],Ll[700],Ll[500],Ll[300],Ll[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Vr(Um);var Vm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,g=t.className,_=g===void 0?"":g,C=zt(Ur({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},p),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),b=function(v,T){Wa(v)&&n({hex:v,source:"hex"},T)};return H.createElement("div",{style:C.card,className:"twitter-picker "+_},H.createElement("div",{style:C.triangleShadow}),H.createElement("div",{style:C.triangle}),H.createElement("div",{style:C.body},Ds(i,function(y,v){return H.createElement($s,{key:v,color:y,hex:y,style:C.swatch,onClick:b,onHover:r,focusStyle:{boxShadow:"0 0 4px "+y}})}),H.createElement("div",{style:C.hash},"#"),H.createElement(en,{label:null,style:{input:C.input},value:o.replace("#",""),onChange:b}),H.createElement("div",{style:C.clear})))};Vm.propTypes={width:ct.oneOfType([ct.string,ct.number]),triangle:ct.oneOf(["hide","top-left","top-right"]),colors:ct.arrayOf(ct.string),styles:ct.object};Vm.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Vr(Vm);var Ym=function(t){var n=zt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return H.createElement("div",{style:n.picker})};Ym.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};Ym.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var qm=function(t){var n=zt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return H.createElement("div",{style:n.picker})};qm.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};qm.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var qU=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(b,y){if(b.hex)Wa(b.hex)&&n({hex:b.hex,source:"hex"},y);else if(b.rgb){var v=b.rgb.split(",");rp(b.rgb,"rgb")&&n({r:v[0],g:v[1],b:v[2],a:1,source:"rgb"},y)}else if(b.hsv){var T=b.hsv.split(",");rp(b.hsv,"hsv")&&(T[2]=T[2].replace("%",""),T[1]=T[1].replace("%",""),T[0]=T[0].replace("°",""),T[1]==1?T[1]=.01:T[2]==1&&(T[2]=.01),n({h:Number(T[0]),s:Number(T[1]),v:Number(T[2]),source:"hsv"},y))}else if(b.hsl){var O=b.hsl.split(",");rp(b.hsl,"hsl")&&(O[2]=O[2].replace("%",""),O[1]=O[1].replace("%",""),O[0]=O[0].replace("°",""),_[1]==1?_[1]=.01:_[2]==1&&(_[2]=.01),n({h:Number(O[0]),s:Number(O[1]),v:Number(O[2]),source:"hsl"},y))}},u=zt({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),p=r.r+", "+r.g+", "+r.b,g=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",_=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return H.createElement("div",{style:u.wrap,className:"flexbox-fix"},H.createElement("div",{style:u.fields},H.createElement("div",{style:u.double},H.createElement(en,{style:{input:u.input,label:u.label},label:"hex",value:i,onChange:l})),H.createElement("div",{style:u.column},H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"rgb",value:p,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsv",value:_,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsl",value:g,onChange:l})))))},Zm=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,l=t.hex,u=t.header,p=t.styles,g=p===void 0?{}:p,_=t.className,C=_===void 0?"":_,b=zt(Ur({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},g));return H.createElement("div",{style:b.picker,className:"google-picker "+C},H.createElement("div",{style:b.head},u),H.createElement("div",{style:b.swatch}),H.createElement("div",{style:b.saturation},H.createElement(qf,{hsl:i,hsv:a,pointer:Ym,onChange:r})),H.createElement("div",{style:b.body},H.createElement("div",{style:b.controls,className:"flexbox-fix"},H.createElement("div",{style:b.hue},H.createElement(dc,{style:b.Hue,hsl:i,radius:"4px",pointer:qm,onChange:r}))),H.createElement(qU,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};Zm.propTypes={width:ct.oneOfType([ct.string,ct.number]),styles:ct.object,header:ct.string};Zm.defaultProps={width:652,styles:{},header:"Color picker"};Vr(Zm);const ZU=({field:e,value:t,onChange:n})=>{const[r,o]=H.useState(!1),i=JU(t);return re.jsx(re.Fragment,{children:re.jsxs(Gn.FieldLabel,{label:e.label||"Label is undefined",className:"ve-mt-2.5",children:[re.jsx("div",{style:i.swatch,onClick:()=>o(a=>!a),children:re.jsx("div",{style:i.color})}),r&&re.jsxs("div",{style:i.popover,children:[re.jsx("div",{style:i.cover,onClick:()=>o(!1)}),re.jsx(BU,{disableAlpha:!0,color:t,onChange:a=>{n(a.hex)}})]})]})})},JU=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),XU=({label:e,onChange:t,value:n,options:r})=>{var p;const[o,i]=H.useState(!1),a=()=>{i(!o)},l=g=>{t(g),i(!1)},u=((p=r.find(g=>g.value===n))==null?void 0:p.label)??"Choose a font";return re.jsx(Gn.FieldLabel,{label:e,icon:re.jsx(Xg,{size:16}),children:re.jsxs("div",{style:{position:"relative"},children:[re.jsx("button",{onClick:a,className:"font-select",style:{fontFamily:n},children:u}),o&&re.jsx("div",{className:"font-select-dropdown",children:r.map(g=>re.jsx("button",{value:g.value,onClick:()=>l(g.value),style:{fontFamily:g.value,backgroundColor:g.value===n?"var(--puck-color-grey-09)":""},className:"font-select-option",children:g.label},g.value))})]})})},QU=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([n,r])=>{if("type"in r){const o=cb(r,r.plugin);o&&(t.objectFields[n]=o)}else{const o={label:r.label,type:"object",objectFields:{}};for(const i in r.styles)o.objectFields[i]=cb(r.styles[i],r.plugin);t.objectFields[n]=o}}),t},cb=(e,t)=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return t==="fontFamily"?{label:e.label,type:"custom",options:e.options,render:({onChange:n,value:r})=>XU({label:e.label,options:typeof e.options=="function"?e.options():e.options,value:r,onChange:n})}:{label:e.label,type:"select",options:typeof e.options=="function"?e.options():e.options};case"color":return{label:e.label,type:"custom",render:ZU}}},eV=(e,t,n="")=>{const r={};return Object.entries(t.styles).forEach(([o,i])=>{if("type"in i){const a=e==null?void 0:e[`--${i.plugin}-${n}-${o}`];r[o]=ub(i,a)}else{const a={};for(const l in i.styles){const u=i.styles[l],p=e==null?void 0:e[`--${i.plugin}-${n}-${o}-${l}`];a[l]=ub(u,p)}r[o]=a}}),r},ub=(e,t)=>{if(t)if(e.type==="number"){const n=Number.parseInt(t);return isNaN(n)?e.default:n}else return t;else return e.default},tV=e=>{var u,p;const{themeConfig:t,themeHistoriesRef:n,onThemeChange:r}=e;if(!n.current)return;if(!t)return re.jsx("div",{children:re.jsx(Jp,{children:re.jsx(Xp,{children:"Please contact your developer to set up theme management."})})});const[o,i]=H.useState(Object.keys(t).reduce((g,_)=>({...g,[_]:!1}),{})),a=g=>{i(_=>({..._,[g]:!_[g]}))},l=(p=n.current)==null?void 0:p.histories[(u=n.current)==null?void 0:u.index].data;return re.jsxs("div",{children:[re.jsx(Jp,{children:re.jsx(Xp,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(t).map(([g,_])=>{const C=QU(_),b=eV(l,_,g),y=o[g];return re.jsxs("div",{className:"theme-field",children:[re.jsxs("button",{className:"ve-flex ve-items-center ve-w-full ve-justify-between",onClick:()=>a(g),children:[`${C.label??""}`,re.jsx("div",{children:y?re.jsx(Xg,{size:12}):re.jsx(T$,{size:12})})]}),!y&&re.jsx(Gn.AutoField,{field:C,onChange:v=>r(g,_,v),value:b})]},g)})]})},nV=e=>{var p,g;const{isDevMode:t,setThemeHistories:n,onPublishTheme:r,themeConfig:o,themeHistories:i,clearThemeHistory:a,puckInitialHistory:l}=e,{history:{setHistories:u}}=Gn.usePuck();return H.useEffect(()=>{u((l==null?void 0:l.histories)||[])},[l]),H.useEffect(()=>{const _=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");_&&(_.style.display="none");const C=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");C&&(C.style.display="none")},[]),re.jsxs("header",{className:"puck-header",children:[re.jsxs("div",{className:"header-left",children:[re.jsx(hC,{}),re.jsx(xC,{})]}),re.jsx("div",{className:"header-center"}),re.jsxs("div",{className:"actions",children:[re.jsx(Cw,{disabled:((p=i==null?void 0:i.histories)==null?void 0:p.length)===1,onClearLocalChanges:()=>{var _,C,b,y,v,T;a(),o&&Nu((C=(_=i==null?void 0:i.histories)==null?void 0:_[0])==null?void 0:C.data,o),n({histories:[{id:((y=(b=i==null?void 0:i.histories)==null?void 0:b[0])==null?void 0:y.id)??"",data:((T=(v=i==null?void 0:i.histories)==null?void 0:v[0])==null?void 0:T.data)??{}}],index:0})}}),!t&&re.jsx(Vi,{variant:"secondary",disabled:((g=i==null?void 0:i.histories)==null?void 0:g.length)===1,onClick:async()=>{await r()},children:"Publish"})]})]})},ip=new Kr,rV=({puckConfig:e,puckInitialHistory:t,isLoading:n,templateMetadata:r,publishThemeConfiguration:o,themeConfig:i,saveThemeSaveState:a,themeHistories:l,setThemeHistories:u,clearThemeHistory:p,sendDevThemeSaveStateData:g,buildThemeLocalStorageKey:_})=>{const[C,b]=H.useState(!1),y=H.useRef(l);H.useEffect(()=>{y.current=l},[l]);const v=async()=>{if(ip.logFunc("saveThemeData"),!l)return;const k=l.histories[l.index];o({payload:{saveThemeData:JSON.stringify(k.data)}}),p(),u({histories:[k],index:0})},T=(k,P,M)=>{var oe,Z,U,Q;if(!y.current||!i)return;const Y={...(oe=y.current.histories[y.current.index])==null?void 0:oe.data,...Y1(M,k,P)},X={histories:[...y.current.histories,{id:z1.v4(),data:Y}],index:y.current.histories.length};window.localStorage.setItem(_(),JSON.stringify(X.histories)),r.isDevMode&&!r.devOverride?(ip.logFunc("sendDevThemeSaveStateData"),g({payload:{devThemeSaveStateData:JSON.stringify((Z=X.histories[X.index])==null?void 0:Z.data)}})):(ip.logFunc("saveTheme"),a({payload:{history:JSON.stringify((U=X.histories[X.index])==null?void 0:U.data),hash:(Q=X.histories[X.index])==null?void 0:Q.id}})),Nu(Y,i),u(X)},O=async()=>{if(!n&&!C){b(!0);return}},R=H.useCallback(()=>re.jsx(tV,{themeHistoriesRef:y,themeConfig:i,onThemeChange:T}),[]);return re.jsx(cC,{children:re.jsx(Gn.Puck,{config:e,data:{},initialHistory:t,onChange:O,permissions:{drag:!1,duplicate:!1,delete:!1,insert:!1,edit:!1},overrides:{header:()=>re.jsx(nV,{themeConfig:i,themeHistories:l,onPublishTheme:v,isDevMode:r.isDevMode,setThemeHistories:u,clearThemeHistory:p,puckInitialHistory:t}),actionBar:()=>re.jsx(re.Fragment,{}),components:()=>re.jsx(re.Fragment,{}),fields:R}})})},oV=()=>{const{sendToParent:e}=Wo("saveThemeSaveState",sr),{sendToParent:t}=Wo("deleteThemeSaveState",sr),{sendToParent:n}=Wo("saveThemeData",sr);return{saveThemeSaveState:e,deleteThemeSaveState:t,publishThemeConfiguration:n}},iV=new Kr,aV=()=>{const{iFrameLoaded:e}=Ts();H.useEffect(()=>{e({payload:{message:"Theme Editor is loaded"}})},[]);const[t,n]=H.useState(void 0),[r,o]=H.useState(!1);return ka("getThemeSaveState",sr,(i,a)=>{iV.logData("THEME_SAVE_STATE",a),n(a),o(!0),i({status:"success",payload:{message:"themeSaveState received"}})}),{themeSaveState:t,themeSaveStateFetched:r}},Hr=new Kr,sV=e=>{const{puckConfig:t,templateMetadata:n,visualConfigurationData:r,themeData:o,themeConfig:i}=e,{sendDevLayoutSaveStateData:a,sendDevThemeSaveStateData:l}=Ts(),{saveThemeSaveState:u,publishThemeConfiguration:p,deleteThemeSaveState:g}=oV(),{themeSaveState:_,themeSaveStateFetched:C}=aV(),{buildThemeLocalStorageKey:b,clearThemeLocalStorage:y}=Tw(n),{buildVisualConfigLocalStorageKey:v}=ww(n),[T,O]=H.useState(),[R,k]=H.useState(!1),[P,M]=H.useState(),[Y,X]=H.useState(!1),oe=H.useCallback(()=>{if(!n)return;Hr.logFunc("loadPuckInitialHistory");const pe=window.localStorage.getItem(v());if(n.isDevMode&&pe){const te=JSON.parse(pe),fe=te.length-1;if(fe>=0){Hr.log("Theme Dev Mode - Using layout data from local storage"),O({histories:te.map(j=>({id:j.id,state:{data:{...j.state.data}}})),index:fe,appendData:!1});const V=T==null?void 0:T.histories[T.histories.length-1].state.data;a({payload:{devSaveStateData:JSON.stringify(V)}})}k(!0);return}r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0)},[O,k,r]),Z=H.useCallback(()=>{if(!n)return;if(Hr.logFunc("loadThemeHistory"),Hr.logData("THEME_DATA",o),Hr.logData("THEME_SAVE_STATE",_),n.isDevMode&&!n.devOverride){const fe=window.localStorage.getItem(b());if(fe){Hr.log("Theme Dev Mode - Using theme localStorage");const V=JSON.parse(fe),j=V.length-1;M({histories:V,index:j}),X(!0);return}Hr.log("Theme Dev Mode - No localStorage. Using theme data from Content"),o&&M({histories:[{id:"root",data:o}],index:0}),X(!0);return}if(!_){y(),Hr.log("Theme Prod Mode - No saveState. Using theme data from Content"),o&&M({histories:[{id:"root",data:o}],index:0}),X(!0);return}const pe=window.localStorage.getItem(b());if(!pe){Hr.log("Theme Prod Mode - No localStorage. Using themeSaveState"),M({histories:o?[{id:"root",data:o},{id:_.hash,data:_.history.data}]:[{id:_.hash,data:_.history.data}],index:o?1:0}),X(!0);return}const te=JSON.parse(pe).findIndex(fe=>fe.id===(_==null?void 0:_.hash));if(te!==-1){Hr.log("Theme Prod Mode - Using localStorage theme data"),M({histories:JSON.parse(pe),index:te}),X(!0);return}y()},[M,X,y,b]);H.useEffect(()=>{var pe;Hr.logData("THEME_HISTORIES",P),P&&i&&Nu((pe=P.histories[P.index])==null?void 0:pe.data,i)},[P,i]),H.useEffect(()=>{C&&(oe(),Z())},[n,C,r]),H.useEffect(()=>{T&&Hr.logData("PUCK_INITIAL_HISTORY",T)},[T]);const U=()=>{Hr.logFunc("clearHistory"),y(),g()};H.useEffect(()=>{var te;if(!Y)return;const pe=(te=P==null?void 0:P.histories[P.index])==null?void 0:te.data;Hr.logFunc("sendDevThemeSaveStateData useEffect"),l({payload:{devThemeSaveStateData:JSON.stringify(pe)}})},[Y,P,n]);const Q=!R||!Y||!C,de=60+(R+Y+C)*13.33;return Q?re.jsx(Fg,{progress:de}):re.jsx(rV,{puckConfig:t,puckInitialHistory:T,isLoading:Q,templateMetadata:n,publishThemeConfiguration:p,themeConfig:i,saveThemeSaveState:u,themeHistories:P,setThemeHistories:M,clearThemeHistory:U,sendDevThemeSaveStateData:l,buildThemeLocalStorageKey:b})},lV=new Kr,cV=({document:e,componentRegistry:t,themeConfig:n})=>{e&&lV.logData("DOCUMENT",e);const[r,o]=H.useState(void 0),[i,a]=H.useState(void 0),[l,u]=H.useState(!1),{templateMetadata:p,puckConfig:g,visualConfigurationData:_,visualConfigurationDataFetched:C,themeData:b,themeDataFetched:y}=AA(t),{pushPageSets:v}=Ts();OA(),H.useEffect(()=>{if(typeof window<"u"){const R=window.location.ancestorOrigins;R.length===0||!R[0].includes("pagescdn")&&!R[0].includes("yext.com")&&!R[0].includes("localhost")?window.location.assign("/404.html"):u(!0)}},[]),H.useEffect(()=>{if(p!=null&&p.isDevMode)try{o(pageSets),a(siteStream)}catch{console.warn("pageSets are not defined")}},[p==null?void 0:p.isDevMode]),H.useEffect(()=>{typeof window<"u"&&(p!=null&&p.isDevMode)&&r&&v({payload:{...r,siteStream:i}})},[p==null?void 0:p.isDevMode,r]);const T=!g||!p||!e||!C||!y,O=60*((!!g+!!p+!!e+C+y)/5);return re.jsxs(re.Fragment,{children:[T?l&&re.jsx(Fg,{progress:O}):p.isThemeMode?re.jsx(sV,{puckConfig:g,templateMetadata:p,visualConfigurationData:_,themeData:b,themeConfig:n}):re.jsx(Sk,{puckConfig:g,templateMetadata:p,visualConfigurationData:_,themeData:b,themeConfig:n}),re.jsx(SA,{closeButton:!0,richColors:!0})]})},uV=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],dV=[],zT=e=>HT(e,""),HT=(e,t)=>{var o,i,a;const n=t?`${t}.${e.name}`:e.name;if(dV.includes(GT(e)))return[{name:n,schemaField:e}];if(e.definition.isList)return[{name:n,schemaField:e}];const r=[{name:n,schemaField:e}];if((o=e.children)!=null&&o.fields&&((a=(i=e.children)==null?void 0:i.fields)==null?void 0:a.length)>0)for(const l of e.children.fields)r.push(...HT(l,n));return r},GT=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function fV(e,t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),e}const hV=e=>e.reduce((t,n)=>{const r=zT(n);for(const o of r){const i=GT(o.schemaField);i&&(t=fV(t,i,o.name))}return t},new Map),pV=e=>{let n=sE().filter(o=>!uV.includes(o.name));if(e!=null&&e.allowList){const o=n.map(i=>i.name);e.allowList.forEach(i=>{o.includes(i)||console.warn(`The entity field filter allowList included ${i}, which does not exist in the stream.`)}),n=n.filter(i=>e.allowList.includes(i.name))}e!=null&&e.disallowList&&(n=n.filter(o=>!e.disallowList.includes(o.name)));let r=[];for(const o of n){const i=zT(o);for(const a of i)r.push({...a.schemaField,name:a.name})}if(e!=null&&e.types){const o=hV(r),i=[];e.types.forEach(a=>{i.push(...r.filter(l=>{var u;return(u=o.get(a))==null?void 0:u.includes(l.name)}))}),r=i}return r=r.filter(o=>!!o.definition.isList==!!(e!=null&&e.includeListsOnly)),r};function gV(e){const t=e+"CollectionProvider",[n,r]=Sf(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:y,children:v}=b,T=H.useRef(null),O=H.useRef(new Map).current;return re.jsx(o,{scope:y,itemMap:O,collectionRef:T,children:v})};a.displayName=t;const l=e+"CollectionSlot",u=H.forwardRef((b,y)=>{const{scope:v,children:T}=b,O=i(l,v),R=lr(y,O.collectionRef);return re.jsx(Pa,{ref:R,children:T})});u.displayName=l;const p=e+"CollectionItemSlot",g="data-radix-collection-item",_=H.forwardRef((b,y)=>{const{scope:v,children:T,...O}=b,R=H.useRef(null),k=lr(y,R),P=i(p,v);return H.useEffect(()=>(P.itemMap.set(R,{ref:R,...O}),()=>void P.itemMap.delete(R))),re.jsx(Pa,{[g]:"",ref:k,children:T})});_.displayName=p;function C(b){const y=i(e+"CollectionConsumer",b);return H.useCallback(()=>{const T=y.collectionRef.current;if(!T)return[];const O=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(y.itemMap.values()).sort((P,M)=>O.indexOf(P.ref.current)-O.indexOf(M.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:_},C,r]}var mV=ge.createContext(void 0);function KT(e){const t=ge.useContext(mV);return e||t||"ltr"}var ap="rovingFocusGroup.onEntryFocus",yV={bubbles:!1,cancelable:!0},Xf="RovingFocusGroup",[fg,UT,vV]=gV(Xf),[bV,VT]=Sf(Xf,[vV]),[_V,xV]=bV(Xf),YT=ge.forwardRef((e,t)=>re.jsx(fg.Provider,{scope:e.__scopeRovingFocusGroup,children:re.jsx(fg.Slot,{scope:e.__scopeRovingFocusGroup,children:re.jsx(EV,{...e,ref:t})})}));YT.displayName=Xf;var EV=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:g=!1,..._}=e,C=ge.useRef(null),b=lr(t,C),y=KT(i),[v=null,T]=Iu({prop:a,defaultProp:l,onChange:u}),[O,R]=ge.useState(!1),k=Yi(p),P=UT(n),M=ge.useRef(!1),[Y,X]=ge.useState(0);return ge.useEffect(()=>{const oe=C.current;if(oe)return oe.addEventListener(ap,k),()=>oe.removeEventListener(ap,k)},[k]),re.jsx(_V,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:ge.useCallback(oe=>T(oe),[T]),onItemShiftTab:ge.useCallback(()=>R(!0),[]),onFocusableItemAdd:ge.useCallback(()=>X(oe=>oe+1),[]),onFocusableItemRemove:ge.useCallback(()=>X(oe=>oe-1),[]),children:re.jsx(kn.div,{tabIndex:O||Y===0?-1:0,"data-orientation":r,..._,ref:b,style:{outline:"none",...e.style},onMouseDown:On(e.onMouseDown,()=>{M.current=!0}),onFocus:On(e.onFocus,oe=>{const Z=!M.current;if(oe.target===oe.currentTarget&&Z&&!O){const U=new CustomEvent(ap,yV);if(oe.currentTarget.dispatchEvent(U),!U.defaultPrevented){const Q=P().filter(V=>V.focusable),de=Q.find(V=>V.active),pe=Q.find(V=>V.id===v),fe=[de,pe,...Q].filter(Boolean).map(V=>V.ref.current);JT(fe,g)}}M.current=!1}),onBlur:On(e.onBlur,()=>R(!1))})})}),qT="RovingFocusGroupItem",ZT=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=Eu(),u=i||l,p=xV(qT,n),g=p.currentTabStopId===u,_=UT(n),{onFocusableItemAdd:C,onFocusableItemRemove:b}=p;return ge.useEffect(()=>{if(r)return C(),()=>b()},[r,C,b]),re.jsx(fg.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:re.jsx(kn.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...a,ref:t,onMouseDown:On(e.onMouseDown,y=>{r?p.onItemFocus(u):y.preventDefault()}),onFocus:On(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:On(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){p.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=TV(y,p.orientation,p.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let O=_().filter(R=>R.focusable).map(R=>R.ref.current);if(v==="last")O.reverse();else if(v==="prev"||v==="next"){v==="prev"&&O.reverse();const R=O.indexOf(y.currentTarget);O=p.loop?NV(O,R+1):O.slice(R+1)}setTimeout(()=>JT(O))}})})})});ZT.displayName=qT;var CV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TV(e,t,n){const r=wV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return CV[r]}function JT(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function NV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SV=YT,OV=ZT,Jm="Radio",[AV,XT]=Ql(Jm),[RV,$V]=AV(Jm),QT=ge.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:l="on",onCheck:u,form:p,...g}=e,[_,C]=ge.useState(null),b=lr(t,T=>C(T)),y=ge.useRef(!1),v=_?p||!!_.closest("form"):!0;return re.jsxs(RV,{scope:n,checked:o,disabled:a,children:[re.jsx(kn.button,{type:"button",role:"radio","aria-checked":o,"data-state":nN(o),"data-disabled":a?"":void 0,disabled:a,value:l,...g,ref:b,onClick:On(e.onClick,T=>{o||u==null||u(),v&&(y.current=T.isPropagationStopped(),y.current||T.stopPropagation())})}),v&&re.jsx(DV,{control:_,bubbles:!y.current,name:r,value:l,checked:o,required:i,disabled:a,form:p,style:{transform:"translateX(-100%)"}})]})});QT.displayName=Jm;var eN="RadioIndicator",tN=ge.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=$V(eN,n);return re.jsx(nc,{present:r||i.checked,children:re.jsx(kn.span,{"data-state":nN(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});tN.displayName=eN;var DV=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=pC(n),l=Vg(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&_){const C=new Event("click",{bubbles:r});_.call(u,n),u.dispatchEvent(C)}},[a,n,r]),re.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function nN(e){return e?"checked":"unchecked"}var kV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xm="RadioGroup",[MV,BJ]=Ql(Xm,[VT,XT]),rN=VT(),oN=XT(),[PV,IV]=MV(Xm),iN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:u,dir:p,loop:g=!0,onValueChange:_,...C}=e,b=rN(n),y=KT(p),[v,T]=Iu({prop:i,defaultProp:o,onChange:_});return re.jsx(PV,{scope:n,name:r,required:a,disabled:l,value:v,onValueChange:T,children:re.jsx(SV,{asChild:!0,...b,orientation:u,dir:y,loop:g,children:re.jsx(kn.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":l?"":void 0,dir:y,...C,ref:t})})})});iN.displayName=Xm;var aN="RadioGroupItem",sN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=IV(aN,n),a=i.disabled||r,l=rN(n),u=oN(n),p=ge.useRef(null),g=lr(t,p),_=i.value===o.value,C=ge.useRef(!1);return ge.useEffect(()=>{const b=v=>{kV.includes(v.key)&&(C.current=!0)},y=()=>C.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",y)}},[]),re.jsx(OV,{asChild:!0,...l,focusable:!a,active:_,children:re.jsx(QT,{disabled:a,required:i.required,checked:_,...u,...o,name:i.name,ref:g,onCheck:()=>i.onValueChange(o.value),onKeyDown:On(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:On(o.onFocus,()=>{var b;C.current&&((b=p.current)==null||b.click())})})})});sN.displayName=aN;var LV="RadioGroupIndicator",lN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=oN(n);return re.jsx(tN,{...o,...r,ref:t})});lN.displayName=LV;var cN=iN,uN=sN,FV=lN;const dN=ge.forwardRef(({className:e,...t},n)=>re.jsx(cN,{className:cn("ve-grid ve-gap-2",e),...t,ref:n}));dN.displayName=cN.displayName;const hg=ge.forwardRef(({className:e,...t},n)=>re.jsx(uN,{ref:n,className:cn("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:re.jsx(FV,{className:"ve-flex ve-items-center ve-justify-center",children:re.jsx(N$,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));hg.displayName=uN.displayName;var jV="Label",fN=ge.forwardRef((e,t)=>re.jsx(kn.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));fN.displayName=jV;var hN=fN;const BV=kr("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),pg=ge.forwardRef(({className:e,...t},n)=>re.jsx(hN,{ref:n,className:cn(BV(),e),...t}));pg.displayName=hN.displayName;function Qm(e){const t=[];return e.fields.forEach(n=>{t.push(WV(e,n))}),re.jsx(re.Fragment,{children:t})}function WV(e,t){return re.jsx(Gn.FieldLabel,{label:t.label,className:"ve-inline-block ve-pt-4",children:re.jsx(Gn.AutoField,{field:{type:t.fieldType},value:e.value[t.field],onChange:n=>{e.onChange({...e.value,[t.field]:n})}})},`constant-${t.field}-label`)}const zV={type:"custom",render:({onChange:e,value:t})=>Qm({onChange:e,value:t,fields:[{label:"Alternate Text",field:"alternateText",fieldType:"text"},{label:"URL",field:"url",fieldType:"text"},{label:"Height",field:"height",fieldType:"number"},{label:"Width",field:"width",fieldType:"number"}]})},db={type:"text"},HV={type:"custom",render:({onChange:e,value:t})=>Qm({onChange:e,value:t,fields:[{label:"Line 1",field:"line1",fieldType:"text"},{label:"Line 2",field:"line2",fieldType:"text"},{label:"Line 3",field:"line3",fieldType:"text"},{label:"City",field:"city",fieldType:"text"},{label:"State/Region",field:"region",fieldType:"text"},{label:"Sublocality",field:"sublocality",fieldType:"text"},{label:"Postal Code",field:"postalCode",fieldType:"text"},{label:"Country Code",field:"countryCode",fieldType:"text"}]})},fb="#969696",GV={type:"custom",render:({onChange:e,value:t})=>{const[n,r]=H.useState(t),o=(l,u)=>{const p=[...n];p[l]=u,r(p),e(p)},i=l=>{const u=n.filter((p,g)=>g!==l);r(u),e(u)},a=()=>{r([...n,""])};return re.jsxs("div",{children:[n.map((l,u)=>re.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px",gap:"4px"},children:[re.jsx(Gn.AutoField,{field:{type:"text"},value:l,onChange:p=>o(u,p)}),re.jsx("span",{style:{color:fb},children:re.jsx(Gn.IconButton,{onClick:()=>i(u),variant:"secondary",title:"Delete",disabled:n.length===1,children:re.jsx(k$,{})})})]},u)),re.jsx("span",{style:{color:fb,width:"auto"},children:re.jsx(Gn.Button,{onClick:a,variant:"secondary",icon:re.jsx(R$,{}),fullWidth:!0,children:re.jsx(re.Fragment,{})})})]})}},KV={type:"custom",render:({onChange:e,value:t})=>Qm({onChange:e,value:t,fields:[{label:"Label",field:"label",fieldType:"text"},{label:"Link",field:"link",fieldType:"text"}]})},gg=new Kr,UV={"type.string":db,"type.phone":db,"type.image":zV,"type.address":HV,"type.cta":KV},VV=(e,t)=>{if(t)return GV;const n=UV[e];if(!n){gg.log(`No constant configuration for ${e}`);return}return n},YV=(e,t)=>{let n;for(const r of e){const o=VV(r,t);if(!o){gg.log(`No mapped configuration for ${r}`);return}if(n||(n=o),n!==o){gg.log(`Could not resolve configuration for ${r}`);return}}return n},Dr=e=>{const t=YV(e.filter.types,!!e.filter.includeListsOnly);return{type:"custom",label:e.label,render:({field:n,value:r,onChange:o})=>{const i=pV(e.filter),a=l=>{o({field:(r==null?void 0:r.field)??"",constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:l})};return re.jsxs(re.Fragment,{children:[!!t&&re.jsx(qV,{constantValueEnabled:r==null?void 0:r.constantValueEnabled,toggleConstantValueEnabled:a}),r!=null&&r.constantValueEnabled?re.jsx(Gn.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:t&&re.jsx(Gn.AutoField,{onChange:l=>o({field:(r==null?void 0:r.field)??"",constantValue:l,constantValueEnabled:!0}),value:r==null?void 0:r.constantValue,field:t})}):re.jsx(Gn.FieldLabel,{label:n.label||"Label is undefined",className:"ve-mt-2.5",children:re.jsx(Gn.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...i.map(l=>({label:l.name,value:l.name}))]},onChange:l=>{o({field:l,constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:!1})},value:r==null?void 0:r.field})})]})}}},qV=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>re.jsx("div",{className:"ve-mb-2 ve-w-full",children:re.jsxs(dN,{defaultValue:(e==null?void 0:e.toString())??"false",children:[re.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[re.jsx(hg,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),re.jsx(pg,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),re.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[re.jsx(hg,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),re.jsx(pg,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),ZV=({label:e,defaultCustomValue:t})=>({type:"custom",render:({onChange:n,value:r})=>re.jsxs(Gn.FieldLabel,{label:e,children:[re.jsx(Gn.AutoField,{field:{type:"radio",options:[{value:"default",label:"Default"},{value:"custom",label:"Custom"}]},onChange:o=>n(o==="default"?"default":t),value:r==="default"?"default":"custom"}),r!=="default"&&re.jsx(Gn.AutoField,{field:{type:"number"},value:r,onChange:n})]})}),JV=[{label:"Default",value:"default",px:""},{label:"XS",value:"xs",px:"12"},{label:"SM",value:"sm",px:"14"},{label:"Base",value:"base",px:"16"},{label:"LG",value:"lg",px:"18"},{label:"XL",value:"xl",px:"20"},{label:"2XL",value:"2xl",px:"24"},{label:"3XL",value:"3xl",px:"30"},{label:"4XL",value:"4xl",px:"36"},{label:"5XL",value:"5xl",px:"48"},{label:"6XL",value:"6xl",px:"60"},{label:"7XL",value:"7xl",px:"72"},{label:"8XL",value:"8xl",px:"96"},{label:"9XL",value:"9xl",px:"128"}],hb=e=>{if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("rem")){const t=parseFloat(getComputedStyle(document.documentElement).fontSize);return parseFloat(e)*t}if(e.endsWith("em")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)*t}if(e.endsWith("%")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)/100*t}throw new Error("Unknown font size unit")},XV=(e,t)=>{var r,o;const n=(o=(r=e==null?void 0:e.theme)==null?void 0:r.extend)==null?void 0:o.fontSize[t];return typeof n=="string"?hb(n):Array.isArray(n)&&n.length>0?hb(n[0]):0},QV=(e,t)=>e.map(n=>{const r=XV(t,n.value),o=r?r.toString():n.px;return{label:n.label+(n.px?` (${o}px)`:""),value:n.value}}),Ma=e=>({type:"custom",render:({value:t,onChange:n})=>{const r=lE();return re.jsx(Gn.FieldLabel,{label:e??"Font Size",icon:re.jsx(Xg,{size:16}),children:re.jsx(Gn.AutoField,{value:t,onChange:n,field:{type:"select",options:QV(JV,r)}})})}}),pN=kr("components font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"}}),Qf=ge.forwardRef(({className:e,fontSize:t,fontWeight:n,color:r,textTransform:o,...i},a)=>re.jsx("p",{className:Nf(e,pN({fontSize:t,fontWeight:n,color:r,textTransform:o,className:e})),ref:a,...i,children:i.children}));Qf.displayName="Body";const gN=kr("py-4 components inline-flex items-center justify-center whitespace-nowrap rounded-button-borderRadius font-body-fontFamily font-button-fontWeight ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ",{variants:{variant:{primary:"bg-button-backgroundColor text-button-textColor border-2 border-button-backgroundColor hover:border-button-textColor focus:border-button-textColor active:bg-button-textColor active:text-button-backgroundColor active:border-button-backgroundColor",link:"text-button-textColor underline-offset-4 underline"},size:{default:"w-full md:w-fit h-10 px-4 py-2",small:"h-9 px-3",large:"h-11 px-8",icon:"h-10 w-10"},fontSize:{default:"text-button-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},borderRadius:{default:"",none:"rounded-none",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default"}}),eh=ge.forwardRef(({className:e,variant:t,size:n,borderRadius:r,asChild:o=!1,fontSize:i,...a},l)=>{const u=o?Pa:"button";return re.jsx(u,{className:Nf(e,gN({variant:t,size:n,borderRadius:r,fontSize:i})),ref:l,...a})});eh.displayName="Button";var e9=Object.defineProperty,t9=(e,t,n)=>t in e?e9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,io=(e,t,n)=>t9(e,typeof t!="symbol"?t+"":t,n),pb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mg={exports:{}},du={};/**
|
|
204
|
+
* @license React
|
|
205
|
+
* react-jsx-runtime.production.min.js
|
|
206
|
+
*
|
|
207
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the MIT license found in the
|
|
210
|
+
* LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/var gb;function r9(){if(gb)return du;gb=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var g,_={},C=null,b=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(b=u.ref);for(g in u)r.call(u,g)&&!i.hasOwnProperty(g)&&(_[g]=u[g]);if(l&&l.defaultProps)for(g in u=l.defaultProps,u)_[g]===void 0&&(_[g]=u[g]);return{$$typeof:t,type:l,key:C,ref:b,props:_,_owner:o.current}}return du.Fragment=n,du.jsx=a,du.jsxs=a,du}var Fd={};/**
|
|
212
|
+
* @license React
|
|
213
|
+
* react-jsx-runtime.development.js
|
|
214
|
+
*
|
|
215
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the MIT license found in the
|
|
218
|
+
* LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/var mb;function o9(){return mb||(mb=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function T(Ee){if(Ee===null||typeof Ee!="object")return null;var ae=y&&Ee[y]||Ee[v];return typeof ae=="function"?ae:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(Ee){{for(var ae=arguments.length,$e=new Array(ae>1?ae-1:0),je=1;je<ae;je++)$e[je-1]=arguments[je];k("error",Ee,$e)}}function k(Ee,ae,$e){{var je=O.ReactDebugCurrentFrame,at=je.getStackAddendum();at!==""&&(ae+="%s",$e=$e.concat([at]));var xt=$e.map(function(bt){return String(bt)});xt.unshift("Warning: "+ae),Function.prototype.apply.call(console[Ee],console,xt)}}var P=!1,M=!1,Y=!1,X=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function U(Ee){return!!(typeof Ee=="string"||typeof Ee=="function"||Ee===r||Ee===i||oe||Ee===o||Ee===p||Ee===g||X||Ee===b||P||M||Y||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===C||Ee.$$typeof===_||Ee.$$typeof===a||Ee.$$typeof===l||Ee.$$typeof===u||Ee.$$typeof===Z||Ee.getModuleId!==void 0))}function Q(Ee,ae,$e){var je=Ee.displayName;if(je)return je;var at=ae.displayName||ae.name||"";return at!==""?$e+"("+at+")":$e}function de(Ee){return Ee.displayName||"Context"}function pe(Ee){if(Ee==null)return null;if(typeof Ee.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Ee=="function")return Ee.displayName||Ee.name||null;if(typeof Ee=="string")return Ee;switch(Ee){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case g:return"SuspenseList"}if(typeof Ee=="object")switch(Ee.$$typeof){case l:var ae=Ee;return de(ae)+".Consumer";case a:var $e=Ee;return de($e._context)+".Provider";case u:return Q(Ee,Ee.render,"ForwardRef");case _:var je=Ee.displayName||null;return je!==null?je:pe(Ee.type)||"Memo";case C:{var at=Ee,xt=at._payload,bt=at._init;try{return pe(bt(xt))}catch{return null}}}return null}var te=Object.assign,fe=0,V,j,ee,ne,B,W,J;function F(){}F.__reactDisabledLog=!0;function w(){{if(fe===0){V=console.log,j=console.info,ee=console.warn,ne=console.error,B=console.group,W=console.groupCollapsed,J=console.groupEnd;var Ee={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:Ee,log:Ee,warn:Ee,error:Ee,group:Ee,groupCollapsed:Ee,groupEnd:Ee})}fe++}}function N(){{if(fe--,fe===0){var Ee={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},Ee,{value:V}),info:te({},Ee,{value:j}),warn:te({},Ee,{value:ee}),error:te({},Ee,{value:ne}),group:te({},Ee,{value:B}),groupCollapsed:te({},Ee,{value:W}),groupEnd:te({},Ee,{value:J})})}fe<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(Ee,ae,$e){{if(q===void 0)try{throw Error()}catch(at){var je=at.stack.trim().match(/\n( *(at )?)/);q=je&&je[1]||""}return`
|
|
220
|
+
`+q+Ee}}var he=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(Ee,ae){if(!Ee||he)return"";{var $e=se.get(Ee);if($e!==void 0)return $e}var je;he=!0;var at=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xt;xt=I.current,I.current=null,w();try{if(ae){var bt=function(){throw Error()};if(Object.defineProperty(bt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(bt,[])}catch(wn){je=wn}Reflect.construct(Ee,[],bt)}else{try{bt.call()}catch(wn){je=wn}Ee.call(bt.prototype)}}else{try{throw Error()}catch(wn){je=wn}Ee()}}catch(wn){if(wn&&je&&typeof wn.stack=="string"){for(var ht=wn.stack.split(`
|
|
221
|
+
`),At=je.stack.split(`
|
|
222
|
+
`),Ut=ht.length-1,Mt=At.length-1;Ut>=1&&Mt>=0&&ht[Ut]!==At[Mt];)Mt--;for(;Ut>=1&&Mt>=0;Ut--,Mt--)if(ht[Ut]!==At[Mt]){if(Ut!==1||Mt!==1)do if(Ut--,Mt--,Mt<0||ht[Ut]!==At[Mt]){var Yt=`
|
|
223
|
+
`+ht[Ut].replace(" at new "," at ");return Ee.displayName&&Yt.includes("<anonymous>")&&(Yt=Yt.replace("<anonymous>",Ee.displayName)),typeof Ee=="function"&&se.set(Ee,Yt),Yt}while(Ut>=1&&Mt>=0);break}}}finally{he=!1,I.current=xt,N(),Error.prepareStackTrace=at}var yn=Ee?Ee.displayName||Ee.name:"",_r=yn?ue(yn):"";return typeof Ee=="function"&&se.set(Ee,_r),_r}function Be(Ee,ae,$e){return Oe(Ee,!1)}function ce(Ee){var ae=Ee.prototype;return!!(ae&&ae.isReactComponent)}function le(Ee,ae,$e){if(Ee==null)return"";if(typeof Ee=="function")return Oe(Ee,ce(Ee));if(typeof Ee=="string")return ue(Ee);switch(Ee){case p:return ue("Suspense");case g:return ue("SuspenseList")}if(typeof Ee=="object")switch(Ee.$$typeof){case u:return Be(Ee.render);case _:return le(Ee.type,ae,$e);case C:{var je=Ee,at=je._payload,xt=je._init;try{return le(xt(at),ae,$e)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Pe.setExtraStackFrame($e)}else Pe.setExtraStackFrame(null)}function Xe(Ee,ae,$e,je,at){{var xt=Function.call.bind(ve);for(var bt in Ee)if(xt(Ee,bt)){var ht=void 0;try{if(typeof Ee[bt]!="function"){var At=Error((je||"React class")+": "+$e+" type `"+bt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Ee[bt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw At.name="Invariant Violation",At}ht=Ee[bt](ae,bt,je,$e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ut){ht=Ut}ht&&!(ht instanceof Error)&&(We(at),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",je||"React class",$e,bt,typeof ht),We(null)),ht instanceof Error&&!(ht.message in Me)&&(Me[ht.message]=!0,We(at),R("Failed %s type: %s",$e,ht.message),We(null))}}}var st=Array.isArray;function dt(Ee){return st(Ee)}function Ct(Ee){{var ae=typeof Symbol=="function"&&Symbol.toStringTag,$e=ae&&Ee[Symbol.toStringTag]||Ee.constructor.name||"Object";return $e}}function Se(Ee){try{return me(Ee),!1}catch{return!0}}function me(Ee){return""+Ee}function _e(Ee){if(Se(Ee))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(Ee)),me(Ee)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(Ee){if(ve.call(Ee,"ref")){var ae=Object.getOwnPropertyDescriptor(Ee,"ref").get;if(ae&&ae.isReactWarning)return!1}return Ee.ref!==void 0}function Et(Ee){if(ve.call(Ee,"key")){var ae=Object.getOwnPropertyDescriptor(Ee,"key").get;if(ae&&ae.isReactWarning)return!1}return Ee.key!==void 0}function Bt(Ee,ae){if(typeof Ee.ref=="string"&&De.current&&ae&&De.current.stateNode!==ae){var $e=pe(De.current.type);tt[$e]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),Ee.ref),tt[$e]=!0)}}function Qe(Ee,ae){{var $e=function(){ke||(ke=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"key",{get:$e,configurable:!0})}}function et(Ee,ae){{var $e=function(){ze||(ze=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"ref",{get:$e,configurable:!0})}}var lt=function(Ee,ae,$e,je,at,xt,bt){var ht={$$typeof:t,type:Ee,key:ae,ref:$e,props:bt,_owner:xt};return ht._store={},Object.defineProperty(ht._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ht,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(ht,"_source",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.freeze&&(Object.freeze(ht.props),Object.freeze(ht)),ht};function wt(Ee,ae,$e,je,at){{var xt,bt={},ht=null,At=null;$e!==void 0&&(_e($e),ht=""+$e),Et(ae)&&(_e(ae.key),ht=""+ae.key),ut(ae)&&(At=ae.ref,Bt(ae,at));for(xt in ae)ve.call(ae,xt)&&!Fe.hasOwnProperty(xt)&&(bt[xt]=ae[xt]);if(Ee&&Ee.defaultProps){var Ut=Ee.defaultProps;for(xt in Ut)bt[xt]===void 0&&(bt[xt]=Ut[xt])}if(ht||At){var Mt=typeof Ee=="function"?Ee.displayName||Ee.name||"Unknown":Ee;ht&&Qe(bt,Mt),At&&et(bt,Mt)}return lt(Ee,ht,At,at,je,De.current,bt)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Rt.setExtraStackFrame($e)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function yt(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===t}function kt(){{if(_t.current){var Ee=pe(_t.current.type);if(Ee)return`
|
|
224
|
+
|
|
225
|
+
Check the render method of \``+Ee+"`."}return""}}function Dt(Ee){return""}var Kt={};function sn(Ee){{var ae=kt();if(!ae){var $e=typeof Ee=="string"?Ee:Ee.displayName||Ee.name;$e&&(ae=`
|
|
226
|
+
|
|
227
|
+
Check the top-level render call using <`+$e+">.")}return ae}}function ur(Ee,ae){{if(!Ee._store||Ee._store.validated||Ee.key!=null)return;Ee._store.validated=!0;var $e=sn(ae);if(Kt[$e])return;Kt[$e]=!0;var je="";Ee&&Ee._owner&&Ee._owner!==_t.current&&(je=" It was passed a child from "+pe(Ee._owner.type)+"."),qe(Ee),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$e,je),qe(null)}}function Er(Ee,ae){{if(typeof Ee!="object")return;if(dt(Ee))for(var $e=0;$e<Ee.length;$e++){var je=Ee[$e];yt(je)&&ur(je,ae)}else if(yt(Ee))Ee._store&&(Ee._store.validated=!0);else if(Ee){var at=T(Ee);if(typeof at=="function"&&at!==Ee.entries)for(var xt=at.call(Ee),bt;!(bt=xt.next()).done;)yt(bt.value)&&ur(bt.value,ae)}}}function Jo(Ee){{var ae=Ee.type;if(ae==null||typeof ae=="string")return;var $e;if(typeof ae=="function")$e=ae.propTypes;else if(typeof ae=="object"&&(ae.$$typeof===u||ae.$$typeof===_))$e=ae.propTypes;else return;if($e){var je=pe(ae);Xe($e,Ee.props,"prop",je,Ee)}else if(ae.PropTypes!==void 0&&!ot){ot=!0;var at=pe(ae);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",at||"Unknown")}typeof ae.getDefaultProps=="function"&&!ae.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(Ee){{for(var ae=Object.keys(Ee.props),$e=0;$e<ae.length;$e++){var je=ae[$e];if(je!=="children"&&je!=="key"){qe(Ee),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),qe(null);break}}Ee.ref!==null&&(qe(Ee),R("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}function Cr(Ee,ae,$e,je,at,xt){{var bt=U(Ee);if(!bt){var ht="";(Ee===void 0||typeof Ee=="object"&&Ee!==null&&Object.keys(Ee).length===0)&&(ht+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var At=Dt();At?ht+=At:ht+=kt();var Ut;Ee===null?Ut="null":dt(Ee)?Ut="array":Ee!==void 0&&Ee.$$typeof===t?(Ut="<"+(pe(Ee.type)||"Unknown")+" />",ht=" Did you accidentally export a JSX literal instead of a component?"):Ut=typeof Ee,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ut,ht)}var Mt=wt(Ee,ae,$e,at,xt);if(Mt==null)return Mt;if(bt){var Yt=ae.children;if(Yt!==void 0)if(je)if(dt(Yt)){for(var yn=0;yn<Yt.length;yn++)Er(Yt[yn],Ee);Object.freeze&&Object.freeze(Yt)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Er(Yt,Ee)}return Ee===r?ra(Mt):Jo(Mt),Mt}}function qn(Ee,ae,$e){return Cr(Ee,ae,$e,!0)}function br(Ee,ae,$e){return Cr(Ee,ae,$e,!1)}var fo=br,oa=qn;Fd.Fragment=r,Fd.jsx=fo,Fd.jsxs=oa}()),Fd}process.env.NODE_ENV==="production"?mg.exports=r9():mg.exports=o9();var an=mg.exports;function i9(e){switch(e){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const a9={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},yb={GOOGLE:"google",APPLE:"apple",BING:"bing"},s9=(e,t)=>{const n={region:"localizedRegionName",countryCode:"localizedCountryName"}[e];return n&&t[n]},mN=(e,t=[],n,r={route:!1},o)=>{const i="Failed to construct query for maps service.";let a=e&&xb([e.line1,e.line2,e.city,e.region,e.postalCode,e.countryCode]);switch(r.provider){case yb.APPLE:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return vb(`${o.latitude},${o.longitude}`,r.route);if(!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return vb(a,r.route)}case yb.BING:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return bb(`${o.latitude},${o.longitude}`,r.route);if(a=e&&xb([e.line1,e.city,e.region,e.postalCode]),!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return bb(a,r.route)}default:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return _b(`${o.latitude},${o.longitude}`,r.route);const l=t.find(u=>{var p;return((p=u==null?void 0:u.publisher)==null?void 0:p.toUpperCase())===a9.GOOGLEMYBUSINESS});if(l!=null&&l.listingUrl)return l.listingUrl;if(!a){console.warn(`${i} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return _b(a,r.route)}}},vb=(e,t)=>t?`https://maps.apple.com/?daddr=${e}`:`https://maps.apple.com/?address=${e}`,bb=(e,t)=>t?`https://bing.com/maps/default.aspx?rtp=adr.${e}`:`https://bing.com/maps/default.aspx?where1=${e}`,_b=(e,t)=>t?`https://maps.google.com/maps/dir/?api=1&destination=${e}`:`https://maps.google.com/maps/search/?api=1&query=${e}`,xb=(e=[])=>{if(!e.length)return"";const t=e.filter(Boolean).join(", ");return encodeURI(t)},l9=({address:e,lines:t,separator:n=",",...r})=>{const o=(t||i9(e.countryCode)).map(i=>an.jsx(c9,{address:e,line:i,separator:n},i.toString()));return H.createElement("div",{...r,key:e.toString()},o)},c9=({address:e,line:t,separator:n})=>{const r=[];for(const o of t){if(o===","){r.push(an.jsx("span",{children:n},o));continue}const i=e[o];if(!i)continue;const a=s9(o,e);if(a){r.push(an.jsxs(ge.Fragment,{children:[" ",an.jsx("abbr",{title:a,children:i})]},o));continue}r.push(an.jsx("span",{children:" "+i},o))}return an.jsx("div",{className:"address-line",children:r})};var hc={};Object.defineProperty(hc,"__esModule",{value:!0});var u9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d9=typeof window<"u"&&typeof window.document<"u",f9=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,h9=(typeof self>"u"?"undefined":u9(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",p9=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),g9=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",Eb=hc.isBrowser=d9;hc.isWebWorker=h9;var m9=hc.isNode=f9;hc.isJsDom=p9;var y9=hc.isDeno=g9;class v9{constructor(){io(this,"name"),io(this,"isServerSide"),io(this,"version");var t;y9?(this.name="deno",this.version="",Eb&&(this.version=((t=window.Deno)==null?void 0:t.version.deno)||""),this.isServerSide=!0):m9?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):Eb?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const yN=()=>new v9,b9=H.createContext(null);H.lazy(()=>Promise.resolve().then(()=>require("./debugger-C-GK2f4q-8oHFLsRA.cjs")));const _9=H.createContext({name:""}),x9=()=>H.useContext(_9).name;function E9(){const e=H.useContext(b9);if(!e)return e;yN().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=x9();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const ys={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},C9=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const o=e.pathname.replace(/^\//,"").split("/");if(o.length<2||o.length>3){console.error(`Invalid path: ${e}`);return}let i;if(o[0]==="f")i="prod";else switch(o[0].replace("f-","")){case"sandbox":{i="sbx";break}case"qa":{i="qa";break}case"dev":{i="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(i==="dev"||i==="sbx")){console.error(`Invalid path: ${e}`);return}let a;if(o.length===3&&(a=parseInt(o[1]),Number.isNaN(a))){console.error(`Invalid account id: ${e}`);return}const l=o[o.length-1].split("."),u=l.length===2?`.${l[1]}`:"",p=l[0];return{scheme:t,partition:r,env:i,accountId:a,contentHash:p,extension:u}},w9=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let o="f";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}const i=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${o}/${i}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},T9=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const o=n[1];let i;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(i=parseFloat(n[2]),Number.isNaN(i)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const a=n[n.length-1].split("."),l=a.length===2?`.${a[1]}`:"",u=a[0];return{scheme:t,env:r,contentHash:o,aspectRatio:i,name:u,extension:l}},N9=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let o="p";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}return`${r}/${o}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},yg=(e,t,n)=>{if(!vN(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const o=T9(r);if(o)return N9(o,t,n)}else if(r.pathname.startsWith("/f")){const o=C9(r);if(o)return w9(o,t,n)}return e},vN=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},bN=({image:e,className:t,width:n,height:r,aspectRatio:o,layout:i=ys.INTRINSIC,placeholder:a,imgOverrides:l,style:u={},loading:p="lazy"})=>{const g=H.useRef(null),[_,C]=H.useState(!1),b="image"in e?e.image:e;H.useEffect(()=>{var oe;(oe=g.current)!=null&&oe.complete&&C(!0)},[]),S9(i,b.width,b.height,n,r,o);const y=Math.abs(b.width);y||console.warn("Invalid image width.");const v=Math.abs(b.height);if(v||console.warn("Invalid image height."),!vN(b.url))return console.error(`Invalid image url: ${b.url}`),an.jsx(an.Fragment,{children:a!=null&&a});const T=n&&n>0?n:void 0,O=r&&r>0?r:void 0,{src:R,imgStyle:k,widths:P}=O9(i,y,v,u,b.url,T,O,o),M=P.map(oe=>`${yg(b.url,oe,v/y*oe)} ${oe}w`).join(", "),Y=[640,768,1024,1280,1536],X=P.map((oe,Z)=>Z===P.length-1?`${oe}px`:`(max-width: ${Y[Z]}px) ${oe}px`).join(", ");return an.jsxs(an.Fragment,{children:[!_&&a!=null&&a,an.jsx("img",{ref:g,style:k,src:R,className:t,width:T,height:O,srcSet:M,sizes:X,loading:p,alt:b.alternateText||"",...l})]})},S9=(e,t,n,r,o,i)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===ys.FIXED){if(!r&&!o){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),o&&o<0&&console.warn(`Using fixed layout but height is invalid: ${o}.`);return}(r||o)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===ys.ASPECT&&!i&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},O9=(e,t,n,r,o,i,a,l)=>{let u=[100,320,640,960,1280,1920],p=yg(o,500,500);const g={...r};switch(g.objectFit=g.objectFit||"cover",g.objectPosition=g.objectPosition||"center",e){case ys.INTRINSIC:g.maxWidth=t,g.width="100%",g.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FIXED:{const{fixedWidth:_,fixedHeight:C,fixedWidths:b}=A9(t,n,u,i,a);g.width=_,g.height=C,u=b,p=yg(o,_,C);break}case ys.ASPECT:g.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FILL:g.width="100%",g.aspectRatio=l?`${l}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:p,imgStyle:g,widths:u}},A9=(e,t,n,r,o)=>r&&o?{fixedWidth:r,fixedHeight:o,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:o?{fixedWidth:o/t*e,fixedHeight:o,fixedWidths:[o/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var _N={exports:{}};/*!
|
|
228
|
+
Copyright (c) 2018 Jed Watson.
|
|
229
|
+
Licensed under the MIT License (MIT), see
|
|
230
|
+
http://jedwatson.github.io/classnames
|
|
231
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var l=n.apply(null,i);l&&r.push(l)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_N);var R9=_N.exports;const $u=n9(R9),Cb=e=>e.linkType==="Email"||!e.linkType&&xN(e.link)?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="Phone"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,xN=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),$9=e=>"href"in e,ey=H.forwardRef(function(e,t){const n=$9(e)?{link:e.href}:e.cta,{children:r,onClick:o,className:i,eventName:a,scope:l,currency:u,amount:p,cta:g,obfuscate:_,customTags:C,customValues:b,...y}=e,v=g?"CTA_CLICK":"LINK",T=a||(g?"cta":"link"),O=E9();if(!(n!=null&&n.link))throw new Error("CTA's link is undefined");const R=_||_!==!1&&xN(n.link),k=async Y=>{const X=Y.currentTarget;let oe="";if(R){Y.preventDefault();const Z=X.href.split("/").at(-1);Z&&(oe=atob(Z))}if(O!==null)try{await O.track({action:v,scope:e.scope,eventName:T,currency:u,amount:p,destinationUrl:oe||X.href,customTags:C,customValues:b})}catch{console.error("Failed to report click Analytics Event")}o&&o(Y),oe&&(window.location.href=oe)},P=R?"Obfuscated, set a label or child":n.link,M={className:$u("Link",i),href:R?btoa(Cb(n)):Cb(n),onClick:k,rel:e.target&&!e.rel?"noopener":void 0,ref:t};return O!=null&&O.getDebugEnabled()&&(M["data-ya-action"]=v,M["data-ya-scopeoverride"]=l,M["data-ya-eventname"]=T),an.jsx("a",{...M,...y,suppressHydrationWarning:!0,children:r||n.label||P})}),vr=Object.freeze({DEGREE:Symbol("deg"),KILOMETER:Symbol("km"),MILE:Symbol("mi"),RADIAN:Symbol("r")}),jd=Object.freeze({MERCATOR:Symbol("mercator"),SPHERICAL:Symbol("spherical")}),sp=3959,lp=6371,D9=["latitude","lat"],k9=["longitude","lon","lng","long"];function wb(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Tb(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function vs(e){return e*Math.PI/180}function Gi(e){return e/Math.PI*180}function M9(e,t){const n=vs(e.latitude),r=vs(t.latitude),o=r-n,i=vs(t.longitude-e.longitude),a=Math.pow(Math.sin(o/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(i/2),2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function P9(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function I9(e,t){const n=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(n)*360/Math.PI-90}class pc{constructor(t,n){let r=t;typeof t=="object"&&(r=wb(t,D9),n=wb(t,k9),r=typeof r=="function"?r():r,n=typeof n=="function"?n():n),this.latitude=r,this.longitude=n}get latitude(){return this._lat}get longitude(){return this._lon}get normalLon(){return((this._lon+180)%360+360)%360-180}set latitude(t){this._lat=Math.max(-90,Math.min(Tb(t),90))}set longitude(t){this._lon=Tb(t)}add(t,n,r=vr.DEGREE,o=jd.SPHERICAL){if(o===jd.MERCATOR&&(r===vr.DEGREE||r===vr.RADIAN)){const i=r===vr.DEGREE?vs(t):t,a=r===vr.DEGREE?n:Gi(n);this.latitude=I9(this.latitude,i),this.longitude+=a}else switch(r){case vr.DEGREE:this.latitude+=t,this.longitude+=n;break;case vr.KILOMETER:this.latitude+=Gi(t)*lp,this.longitude+=Gi(n)*lp*Math.cos(vs(this.latitude));break;case vr.MILE:this.latitude+=Gi(t)*sp,this.longitude+=Gi(n)*sp*Math.cos(vs(this.latitude));break;case vr.RADIAN:this.latitude+=Gi(t),this.longitude+=Gi(n);break;default:throw new Error(`unit unhandled: ${r}`)}}distanceTo(t,n=vr.MILE,r=jd.SPHERICAL){if(r===jd.MERCATOR&&(n===vr.DEGREE||n===vr.RADIAN)){const o=P9(this.latitude,t.latitude),i=Math.abs(t.normalLon-this.normalLon),a=vs(Math.min(i,360-i)),l=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));switch(n){case vr.DEGREE:return Gi(l);case vr.RADIAN:return l;default:throw new Error(`unit unhandled: ${n}`)}}else{const o=M9(this,t);switch(n){case vr.DEGREE:return Gi(o);case vr.KILOMETER:return o*lp;case vr.MILE:return o*sp;case vr.RADIAN:return o;default:throw new Error(`unit unhandled: ${n}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function EN(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}const Hl={UNDEFINED:"undefined",NULL:"object",BOOLEAN:"boolean",NUMBER:"number",BIGINT:"bigint",STRING:"string",SYMBOL:"symbol",FUNCTION:"function",OBJECT:"object"};function Gl(e,t){if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function ql(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class L9{constructor(t,n){ql(t,ny),ql(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return Gl(t,Hl.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Gl(t,Hl.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class gc{constructor(t){ql(t,L9),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class F9{constructor(t){ql(t,ny),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={}}withClickHandler(t){return Gl(t,Hl.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return Gl(t,Hl.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return Gl(t,Hl.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}build(){const t=this.providerPinClass;return new t(this)}}class ty{constructor(t){ql(t,F9),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const j9=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class th extends ty{static get baseStyle(){return j9}constructor(t){super(t),this._pinEl=document.createElement("button"),Object.assign(this._pinEl.style,this.constructor.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}addListeners(){this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(t){this.setElementProperties(t);const n=t.getClass(),r=t.getElement()||this._pinEl,o=t.getZIndex();r.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=o,this._wrapper.setAttribute("class",n),r!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(r)))}setElementProperties(t){const n=t.getAnchorX(),r=t.getAnchorY(),o=t.getHeight(),i=this._icons[t.getIcon()],a=t.getSRText(),l=t.getWidth();Object.assign(this._pinEl.style,{backgroundImage:i?`url("${i}")`:"",height:o+"px",transform:`translate(${-100*n}%, ${-100*r}%)`,width:l+"px"}),this._pinAlt.innerText=a}}class ks{constructor(){this.loadFunction=(t,n,r,o)=>t(),this.mapClass=gc,this.pinClass=ty,this.providerName=""}withLoadFunction(t){return Gl(t,Hl.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new ny(this)}}class ny{constructor(t){ql(t,ks),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){this._loadInvoked||(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}const Nb={GEOCODER:"geocoder",PLACES:"places"};class B9 extends gc{constructor(t){super(t),this.map=new google.maps.Map(t.wrapper,{disableDefaultUI:!t.controlEnabled,fullscreenControl:!1,gestureHandling:t.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:t.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...t.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()})}getCenter(){return new pc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new google.maps.LatLng(t.latitude,t.longitude);n?this.map.panTo(r):this.map.setCenter(r)}setZoom(t,n){this.map.setZoom(Math.floor(t))}setZoomCenter(t,n,r){this.setCenter(n,r),this.setZoom(t,r)}}class W9 extends th{constructor(t){super(t),this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper);const n=this;class r extends google.maps.OverlayView{draw(){var i;const a=(i=this.getProjection())==null?void 0:i.fromLatLngToDivPixel(n._latLng);a&&(n._wrapper.style.left=a.x+"px",n._wrapper.style.top=a.y+"px")}onAdd(){this.getPanes().floatPane.appendChild(n._wrapper)}onRemove(){var i;(i=n._wrapper.parentNode)==null||i.removeChild(n._wrapper)}}this.pin=new r}setCoordinate(t){this._latLng=new google.maps.LatLng(t.latitude,t.longitude),this.pin.draw()}setMap(t,n){this.pin.setMap(t?t.getProviderMap().map:null)}}const Sb="GoogleMapsCallback_b7d77ff2",z9="https://maps.googleapis.com/maps/api/js";function H9(e,t,n,{autocomplete:r=!1,channel:o=window.location.hostname,client:i,language:a,region:l,libraries:u=[],loading:p="async",params:g={}}={}){window[Sb]=e,r&&u.push(Nb.GEOCODER,Nb.PLACES);const _={callback:Sb,channel:o,libraries:u.join(","),...g};n&&(_.key=n),i&&(_.client=i),a&&(_.language=a),l&&(_.region=l),p&&(_.loading=p),EN(z9+"?"+Object.entries(_).map(([C,b])=>C+"="+b).join("&"))}new ks().withLoadFunction(H9).withMapClass(B9).withPinClass(W9).withProviderName("Google").build();H.createContext(null);H.createContext(null);var cp={},fu={},Ob;function G9(){if(Ob)return fu;Ob=1;var e=H;const t=e.createContext(null);function n(o,i){let a=null;o!=null&&(a=o[1]);function l(){return i??(a!=null?a.getTheme():null)}return{getTheme:l}}function r(){const o=e.useContext(t);if(o==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return o}return fu.LexicalComposerContext=t,fu.createLexicalComposerContext=n,fu.useLexicalComposerContext=r,fu}var hu={},Ab;function K9(){if(Ab)return hu;Ab=1;var e=H;function t(r){let o=new URLSearchParams;o.append("code",r);for(let i=1;i<arguments.length;i++)o.append("v",arguments[i]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${o} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return hu.LexicalComposerContext=n,hu.createLexicalComposerContext=function(r,o){let i=null;return r!=null&&(i=r[1]),{getTheme:function(){return o??(i!=null?i.getTheme():null)}}},hu.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},hu}var Rb,$b;function cr(){return $b||($b=1,Rb=process.env.NODE_ENV==="development"?G9():K9()),Rb}var Ke={},Db;function U9(){if(Db)return Ke;Db=1;function e(m){return{type:m}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("CLICK_COMMAND"),r=e("DELETE_CHARACTER_COMMAND"),o=e("INSERT_LINE_BREAK_COMMAND"),i=e("INSERT_PARAGRAPH_COMMAND"),a=e("CONTROLLED_TEXT_INSERTION_COMMAND"),l=e("PASTE_COMMAND"),u=e("REMOVE_TEXT_COMMAND"),p=e("DELETE_WORD_COMMAND"),g=e("DELETE_LINE_COMMAND"),_=e("FORMAT_TEXT_COMMAND"),C=e("UNDO_COMMAND"),b=e("REDO_COMMAND"),y=e("KEYDOWN_COMMAND"),v=e("KEY_ARROW_RIGHT_COMMAND"),T=e("MOVE_TO_END"),O=e("KEY_ARROW_LEFT_COMMAND"),R=e("MOVE_TO_START"),k=e("KEY_ARROW_UP_COMMAND"),P=e("KEY_ARROW_DOWN_COMMAND"),M=e("KEY_ENTER_COMMAND"),Y=e("KEY_SPACE_COMMAND"),X=e("KEY_BACKSPACE_COMMAND"),oe=e("KEY_ESCAPE_COMMAND"),Z=e("KEY_DELETE_COMMAND"),U=e("KEY_TAB_COMMAND"),Q=e("INSERT_TAB_COMMAND"),de=e("INDENT_CONTENT_COMMAND"),pe=e("OUTDENT_CONTENT_COMMAND"),te=e("DROP_COMMAND"),fe=e("FORMAT_ELEMENT_COMMAND"),V=e("DRAGSTART_COMMAND"),j=e("DRAGOVER_COMMAND"),ee=e("DRAGEND_COMMAND"),ne=e("COPY_COMMAND"),B=e("CUT_COMMAND"),W=e("SELECT_ALL_COMMAND"),J=e("CLEAR_EDITOR_COMMAND"),F=e("CLEAR_HISTORY_COMMAND"),w=e("CAN_REDO_COMMAND"),N=e("CAN_UNDO_COMMAND"),I=e("FOCUS_COMMAND"),q=e("BLUR_COMMAND"),ue=e("KEY_MODIFIER_COMMAND"),he=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",se=he&&"documentMode"in document?document.documentMode:null,Ce=he&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Oe=he&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Be=he&&"InputEvent"in window&&!se?"getTargetRanges"in new window.InputEvent("input"):!1,ce=he&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),le=he&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ve=he&&/Android/.test(navigator.userAgent),Me=he&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Pe=he&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Me,We=1,Xe=3,st=0,dt=1,Ct=2,Se=0,me=1,_e=2,De=1,Fe=2,ke=4,ze=8,tt=16,ut=32,Et=64,Bt=128,Qe=De|Fe|ke|ze|tt|ut|Et|Bt,et=1,lt=2,wt=1,_t=2,Rt=3,qe=4,ot=5,yt=6,kt=" ",Dt=ce||le||Pe?kt:"",Kt=`
|
|
232
|
+
|
|
233
|
+
`,sn=Oe?kt:Dt,ur="֑-߿יִ-﷽ﹰ-ﻼ",Er="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Jo=new RegExp("^[^"+Er+"]*["+ur+"]"),ra=new RegExp("^[^"+ur+"]*["+Er+"]"),Cr={bold:De,code:tt,highlight:Bt,italic:Fe,strikethrough:ke,subscript:ut,superscript:Et,underline:ze},qn={directionless:et,unmergeable:lt},br={center:_t,end:yt,justify:qe,left:wt,right:Rt,start:ot},fo={[_t]:"center",[yt]:"end",[qe]:"justify",[wt]:"left",[Rt]:"right",[ot]:"start"},oa={normal:Se,segmented:_e,token:me},Ee={[Se]:"normal",[_e]:"segmented",[me]:"token"},ae=100;let $e=!1,je=0;function at(){return $e}function xt(m){je=m.timeStamp}function bt(m){je===0&&Oo(m).addEventListener("textInput",xt,!0)}function ht(m,c,h){return c.__lexicalLineBreak===m||m[`__lexicalKey_${h._key}`]!==void 0}function At(m){return m.getEditorState().read(()=>{const c=xn();return c!==null?c.clone():null})}function Ut(m,c,h){const E=jr(h._window);let S=null,$=null;E!==null&&E.anchorNode===m&&(S=E.anchorOffset,$=E.focusOffset);const G=m.nodeValue;G!==null&&zs(c,G,S,$,!1)}function Mt(m,c,h){if(Tt(m)){const E=m.anchor.getNode();if(E.is(h)&&m.format!==E.getFormat())return!1}return c.nodeType===Xe&&h.isAttached()}function Yt(m,c,h){$e=!0;const E=performance.now()-je>ae;try{eo(m,()=>{const S=xn()||At(m),$=new Map,G=m.getRootElement(),K=m._editorState,be=m._blockCursorElement;let ye=!1,Ne="";for(let Ae=0;Ae<c.length;Ae++){const Te=c[Ae],He=Te.type,Le=Te.target;let Je=Zr(Le,K);if(!(Je===null&&Le!==G||Wn(Je))){if(He==="characterData")E&&St(Je)&&Mt(S,Le,Je)&&Ut(Le,Je,m);else if(He==="childList"){ye=!0;const ft=Te.addedNodes;for(let Ht=0;Ht<ft.length;Ht++){const Pt=ft[Ht],Zt=Fs(Pt),jt=Pt.parentNode;if(jt!=null&&Pt!==be&&Zt===null&&(Pt.nodeName!=="BR"||!ht(Pt,jt,m))){if(Oe){const Jt=Pt.innerText||Pt.nodeValue;Jt&&(Ne+=Jt)}jt.removeChild(Pt)}}const Ye=Te.removedNodes,Ft=Ye.length;if(Ft>0){let Ht=0;for(let Pt=0;Pt<Ft;Pt++){const Zt=Ye[Pt];(Zt.nodeName==="BR"&&ht(Zt,Le,m)||be===Zt)&&(Le.appendChild(Zt),Ht++)}Ft!==Ht&&(Le===G&&(Je=Bs(K)),$.set(Le,Je))}}}}if($.size>0)for(const[Ae,Te]of $)if(rt(Te)){const He=Te.getChildrenKeys();let Le=Ae.firstChild;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=m.getElementByKey(ft);Ye!==null&&(Le==null?(Ae.appendChild(Ye),Le=Ye):Le!==Ye&&Ae.replaceChild(Ye,Le),Le=Le.nextSibling)}}else St(Te)&&Te.markDirty();const we=h.takeRecords();if(we.length>0){for(let Ae=0;Ae<we.length;Ae++){const Te=we[Ae],He=Te.addedNodes,Le=Te.target;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=ft.parentNode;Ye!=null&&ft.nodeName==="BR"&&!ht(ft,Le,m)&&Ye.removeChild(ft)}}h.takeRecords()}S!==null&&(ye&&(S.dirty=!0,hr(S)),Oe&&ei(m)&&S.insertRawText(Ne))})}finally{$e=!1}}function yn(m){const c=m._observer;if(c!==null){const h=c.takeRecords();Yt(m,h,c)}}function _r(m){bt(m),m._observer=new MutationObserver((c,h)=>{Yt(m,c,h)})}function wn(m,c){const h=m.__mode,E=m.__format,S=m.__style,$=c.__mode,G=c.__format,K=c.__style;return(h===null||h===$)&&(E===null||E===G)&&(S===null||S===K)}function Zn(m,c){const h=m.mergeWithSibling(c),E=$n()._normalizedNodes;return E.add(m.__key),E.add(c.__key),h}function Mr(m){let c=m;if(c.__text===""&&c.isSimpleText()&&!c.isUnmergeable()){c.remove();return}let h;for(;(h=c.getPreviousSibling())!==null&&St(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(wn(h,c)){c=Zn(h,c);break}else break;let E;for(;(E=c.getNextSibling())!==null&&St(E)&&E.isSimpleText()&&!E.isUnmergeable();)if(E.__text==="")E.remove();else if(wn(c,E)){c=Zn(c,E);break}else break}function ia(m){return Xo(m.anchor),Xo(m.focus),m}function Xo(m){for(;m.type==="element";){const c=m.getNode(),h=m.offset;let E,S;if(h===c.getChildrenSize()?(E=c.getChildAtIndex(h-1),S=!0):(E=c.getChildAtIndex(h),S=!1),St(E)){m.set(E.__key,S?E.getTextContentSize():0,"text");break}else if(!rt(E))break;m.set(E.__key,S?E.getChildrenSize():0,"element")}}let _c=1;function xc(){return""+_c++}function Ec(m,c){const h=m._nodes.get(c);if(h===void 0)throw Error(`registeredNode: Type ${c} not found`);return h}const ho=typeof queueMicrotask=="function"?queueMicrotask:m=>{Promise.resolve().then(m)};function Is(m){return Wn(Zr(m))}function Cc(m){const c=document.activeElement;if(c===null)return!1;const h=c.nodeName;return Wn(Zr(m))&&(h==="INPUT"||h==="TEXTAREA"||c.contentEditable==="true"&&c.__lexicalEditor==null)}function Qo(m,c,h){const E=m.getRootElement();try{return E!==null&&E.contains(c)&&E.contains(h)&&c!==null&&!Cc(c)&&Ti(c)===m}catch{return!1}}function Ti(m){let c=m;for(;c!=null;){const h=c.__lexicalEditor;if(h!=null)return h;c=Ks(c)}return null}function wc(m){return Jo.test(m)?"rtl":ra.test(m)?"ltr":null}function Ls(m){return m.isToken()||m.isSegmented()}function ch(m){return m.nodeType===Xe}function An(m){let c=m;for(;c!=null;){if(ch(c))return c;c=c.firstChild}return null}function Qn(m,c,h){const E=Cr[c];if(h!==null&&(m&E)===(h&E))return m;let S=m^E;return c==="subscript"?S&=~Cr.superscript:c==="superscript"&&(S&=~Cr.subscript),S}function wo(m){return St(m)||$o(m)||Wn(m)}function To(m,c){if(c!=null){m.__key=c;return}Sr(),Oy();const h=$n(),E=ui(),S=xc();E._nodeMap.set(S,m),rt(m)?h._dirtyElements.set(S,!0):h._dirtyLeaves.add(S),h._cloneNotNeeded.add(S),h._dirtyType=dt,m.__key=S}function dr(m,c,h){let E=m;for(;E!==null;){if(h.has(E))return;const S=c.get(E);if(S===void 0)break;h.set(E,!1),E=S.__parent}}function Yr(m){const c=m.getParent();if(c!==null){const h=m.getWritable(),E=c.getWritable(),S=m.getPreviousSibling(),$=m.getNextSibling();if(S===null)if($!==null){const G=$.getWritable();E.__first=$.__key,G.__prev=null}else E.__first=null;else{const G=S.getWritable();if($!==null){const K=$.getWritable();K.__prev=G.__key,G.__next=K.__key}else G.__next=null;h.__prev=null}if($===null)if(S!==null){const G=S.getWritable();E.__last=S.__key,G.__next=null}else E.__last=null;else{const G=$.getWritable();if(S!==null){const K=S.getWritable();K.__next=G.__key,G.__prev=K.__key}else G.__prev=null;h.__next=null}E.__size--,h.__parent=null}}function Ga(m){Oy();const c=m.getLatest(),h=c.__parent,E=ui(),S=$n(),$=E._nodeMap,G=S._dirtyElements;h!==null&&dr(h,$,G);const K=c.__key;S._dirtyType=dt,rt(m)?G.set(K,!0):S._dirtyLeaves.add(K)}function Tc(m){const c=m.getPreviousSibling(),h=m.getNextSibling();c!==null&&Ga(c),h!==null&&Ga(h)}function Mn(m){Sr();const c=$n(),h=c._compositionKey;if(m!==h){if(c._compositionKey=m,h!==null){const E=Ln(h);E!==null&&E.getWritable()}if(m!==null){const E=Ln(m);E!==null&&E.getWritable()}}}function qr(){return ll()?null:$n()._compositionKey}function Ln(m,c){const h=(c||ui())._nodeMap.get(m);return h===void 0?null:h}function Fs(m,c){const h=$n(),E=m[`__lexicalKey_${h._key}`];return E!==void 0?Ln(E,c):null}function Zr(m,c){let h=m;for(;h!=null;){const E=Fs(h,c);if(E!==null)return E;h=Ks(h)}return null}function No(m){const c=m._decorators,h=Object.assign({},c);return m._pendingDecorators=h,h}function js(m){return m.read(()=>fr().getTextContent())}function Ka(m,c){eo(m,()=>{const h=ui();if(h.isEmpty())return;if(c==="root"){fr().markDirty();return}const E=h._nodeMap;for(const[,S]of E)S.markDirty()},m._pendingEditorState===null?{tag:"history-merge"}:void 0)}function fr(){return Bs(ui())}function Bs(m){return m._nodeMap.get("root")}function hr(m){Sr();const c=ui();if(m!==null){if(Object.isFrozen(m))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");m.dirty=!0,m.setCachedNodes(null)}c._selection=m}function Xu(){Sr();const m=$n();yn(m)}function Ni(m){const c=$n(),h=Nc(m,c);if(h===null){const E=c.getRootElement();return m===E?Ln("root"):null}return Ln(h)}function Ua(m,c){return c?m.getTextContentSize():0}function Nc(m,c){let h=m;for(;h!=null;){const E=h[`__lexicalKey_${c._key}`];if(E!==void 0)return E;h=Ks(h)}return null}function Sc(m){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(m)}function Ws(m){const c=[];let h=m;for(;h!==null;)c.push(h),h=h._parentEditor;return c}function Oc(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Va(m){return m.nodeType===Xe?m.nodeValue:null}function Si(m,c,h){const E=jr(c._window);if(E===null)return;const S=E.anchorNode;let{anchorOffset:$,focusOffset:G}=E;if(S!==null){let K=Va(S);const be=Zr(S);if(K!==null&&St(be)){if(K===Dt&&h){const ye=h.length;K=h,$=ye,G=ye}K!==null&&zs(be,K,$,G,m)}}}function zs(m,c,h,E,S){let $=m;if($.isAttached()&&(S||!$.isDirty())){const G=$.isComposing();let K=c;(G||S)&&c[c.length-1]===Dt&&(K=c.slice(0,-1));const be=$.getTextContent();if(S||K!==be){if(K===""){if(Mn(null),!ce&&!le&&!Pe){const Le=$n();setTimeout(()=>{Le.update(()=>{$.isAttached()&&$.remove()})},20)}else $.remove();return}const ye=$.getParent(),Ne=sl(),we=$.getTextContentSize(),Ae=qr(),Te=$.getKey();if($.isToken()||Ae!==null&&Te===Ae&&!G||Tt(Ne)&&(ye!==null&&!ye.canInsertTextBefore()&&Ne.anchor.offset===0||Ne.anchor.key===m.__key&&Ne.anchor.offset===0&&!$.canInsertTextBefore()||Ne.focus.key===m.__key&&Ne.focus.offset===we&&!$.canInsertTextAfter())){$.markDirty();return}const He=xn();if(!Tt(He)||h===null||E===null){$.setTextContent(K);return}if(He.setTextNodeRange($,h,$,E),$.isSegmented()){const Le=$.getTextContent(),Je=Kn(Le);$.replace(Je),$=Je}$.setTextContent(K)}}}function Ac(m){const c=m.getPreviousSibling();return(St(c)||rt(c)&&c.isInline())&&!c.canInsertTextAfter()}function Rc(m,c){if(c.isSegmented())return!0;if(!m.isCollapsed())return!1;const h=m.anchor.offset,E=c.getParentOrThrow(),S=c.isToken();return h===0?!c.canInsertTextBefore()||!E.canInsertTextBefore()||S||Ac(c):h===c.getTextContentSize()?!c.canInsertTextAfter()||!E.canInsertTextAfter()||S:!1}function So(m,c,h,E){return m===9&&!c&&!h&&!E}function $c(m,c,h,E){return m===66&&!c&&Oi(h,E)}function Ya(m,c,h,E){return m===73&&!c&&Oi(h,E)}function Qu(m,c,h,E){return m===85&&!c&&Oi(h,E)}function ed(m,c){return la(m)&&!c}function aa(m,c){return la(m)&&c}function qa(m,c){return Ce&&c&&m===79}function Dc(m,c,h){return Xa(m)&&(Ce?c:h)}function kc(m,c,h){return Qa(m)&&(Ce?c:h)}function Za(m,c){return Ce&&c&&Xa(m)}function Ja(m,c){return Ce&&c&&Qa(m)}function td(m,c,h,E){return Ce?c||h?!1:Xa(m)||m===72&&E:E||c||h?!1:Xa(m)}function nd(m,c,h,E,S){return Ce?h||E||S?!1:Qa(m)||m===68&&c:c||E||S?!1:Qa(m)}function rd(m,c,h,E){return m===90&&!c&&Oi(h,E)}function od(m,c,h,E){return Ce?m===90&&h&&c:m===89&&E||m===90&&E&&c}function uh(m,c,h,E){return c?!1:m===67?Ce?h:E:!1}function dh(m,c,h,E){return c?!1:m===88?Ce?h:E:!1}function Mc(m){return m===37}function id(m){return m===39}function fh(m){return m===38}function hh(m){return m===40}function ph(m,c,h,E){return Mc(m)&&!c&&!E&&!h}function Pc(m,c,h,E,S){return Mc(m)&&!E&&!h&&(c||S)}function gh(m,c,h,E){return id(m)&&!c&&!E&&!h}function mh(m,c,h,E,S){return id(m)&&!E&&!h&&(c||S)}function ad(m,c,h){return fh(m)&&!c&&!h}function sa(m,c,h){return hh(m)&&!c&&!h}function sd(m,c,h,E){return m||c||h||E}function yh(m){return m===32}function Oi(m,c){return Ce?m:c}function la(m){return m===13}function Xa(m){return m===8}function ca(m){return m===27}function Qa(m){return m===46}function Ai(m,c,h){return m===65&&Oi(c,h)}function Ri(){const m=fr(),c=m.select(0,m.getChildrenSize());hr(ia(c))}function $i(m,c){m.__lexicalClassNameCache===void 0&&(m.__lexicalClassNameCache={});const h=m.__lexicalClassNameCache,E=h[c];if(E!==void 0)return E;const S=m[c];if(typeof S=="string"){const $=S.split(" ");return h[c]=$,$}return S}function es(m,c,h,E,S){if(h.size===0)return;const $=E.__type,G=E.__key,K=c.get($);if(K===void 0)throw Error(`Type ${$} not in registeredNodes`);const be=K.klass;let ye=m.get(be);ye===void 0&&(ye=new Map,m.set(be,ye));const Ne=ye.get(G),we=Ne==="destroyed"&&S==="created";(Ne===void 0||we)&&ye.set(G,we?"updated":S)}function Ic(m){const c=ui(),h=c._readOnly,E=m.getType(),S=c._nodeMap,$=[];for(const[,G]of S)G instanceof m&&G.__type===E&&(h||G.isAttached())&&$.push(G);return $}function Hs(m,c,h){const E=m.getParent();let S=h,$=m;return E!==null&&(c&&h===0?(S=$.getIndexWithinParent(),$=E):!c&&h===$.getChildrenSize()&&(S=$.getIndexWithinParent()+1,$=E)),$.getChildAtIndex(c?S-1:S)}function ua(m,c){const h=m.offset;if(m.type==="element"){const E=m.getNode();return Hs(E,c,h)}else{const E=m.getNode();if(c&&h===0||!c&&h===E.getTextContentSize()){const S=c?E.getPreviousSibling():E.getNextSibling();return S===null?Hs(E.getParentOrThrow(),c,E.getIndexWithinParent()+(c?0:1)):S}}return null}function ei(m){const c=Oo(m).event,h=c&&c.inputType;return h==="insertFromPaste"||h==="insertFromPasteAsQuotation"}function mt(m,c,h){return ky(m,c,h)}function Gs(m){return!to(m)&&!m.isLastChild()&&!m.isInline()}function ts(m,c){const h=m._keyToDOMMap.get(c);if(h===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${c}`);return h}function Ks(m){const c=m.assignedSlot||m.parentElement;return c!==null&&c.nodeType===11?c.host:c}function vh(m,c,h){const E=h.ownerDocument,S=E.defaultView;if(S===null)return;let{top:$,bottom:G}=c,K=0,be=0,ye=h;for(;ye!==null;){const Ne=ye===E.body;if(Ne)K=0,be=Oo(m).innerHeight;else{const Ae=ye.getBoundingClientRect();K=Ae.top,be=Ae.bottom}let we=0;if($<K?we=-(K-$):G>be&&(we=G-be),we!==0)if(Ne)S.scrollBy(0,we);else{const Ae=ye.scrollTop;ye.scrollTop+=we;const Te=ye.scrollTop-Ae;$-=Te,G-=Te}if(Ne)break;ye=Ks(ye)}}function ld(m){return $n()._updateTags.has(m)}function bh(m){Sr(),$n()._updateTags.add(m)}function ti(m){const c=xn();if(!Tt(c)||!rt(m))return c;const{anchor:h,focus:E}=c,S=h.getNode(),$=E.getNode();return Fn(S,m)&&h.set(m.__key,0,"element"),Fn($,m)&&E.set(m.__key,0,"element"),c}function Fn(m,c){let h=m.getParent();for(;h!==null;){if(h.is(c))return!0;h=h.getParent()}return!1}function Nt(m){const c=m.ownerDocument;return c&&c.defaultView||null}function Oo(m){const c=m._window;if(c===null)throw Error("window object not found");return c}function Us(m){return rt(m)&&m.isInline()||Wn(m)&&m.isInline()}function Lc(m){let c=m.getParentOrThrow();for(;c!==null;){if(er(c))return c;c=c.getParentOrThrow()}return c}function er(m){return to(m)||rt(m)&&m.isShadowRoot()}function Vs(m){const c=m.constructor.clone(m);return To(c,null),c}function da(m){const c=$n(),h=m.constructor.getType(),E=c._nodes.get(h);if(E===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const S=E.replace;if(S!==null){const $=S(m);if(!($ instanceof m.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return $}return m}function Ys(m,c){const h=m.getParent();if(to(h)&&!rt(c)&&!Wn(c))throw Error("Only element or decorator nodes can be inserted in to the root node")}function ni(m){const c=m.theme,h=document.createElement("div");h.contentEditable="false",h.setAttribute("data-lexical-cursor","true");let E=c.blockCursor;if(E!==void 0){if(typeof E=="string"){const S=E.split(" ");E=c.blockCursor=S}E!==void 0&&h.classList.add(...E)}return h}function ns(m){return(Wn(m)||rt(m)&&!m.canBeEmpty())&&!m.isInline()}function fa(m,c,h){h.style.removeProperty("caret-color"),c._blockCursorElement=null;const E=m.parentElement;E!==null&&E.removeChild(m)}function Lt(m,c,h){let E=m._blockCursorElement;if(Tt(h)&&h.isCollapsed()&&h.anchor.type==="element"&&c.contains(document.activeElement)){const S=h.anchor,$=S.getNode(),G=S.offset,K=$.getChildrenSize();let be=!1,ye=null;if(G===K){const Ne=$.getChildAtIndex(G-1);ns(Ne)&&(be=!0)}else{const Ne=$.getChildAtIndex(G);if(ns(Ne)){const we=Ne.getPreviousSibling();(we===null||ns(we))&&(be=!0,ye=m.getElementByKey(Ne.__key))}}if(be){const Ne=m.getElementByKey($.__key);E===null&&(m._blockCursorElement=E=ni(m._config)),c.style.caretColor="transparent",ye===null?Ne.appendChild(E):Ne.insertBefore(E,ye);return}}E!==null&&fa(E,m,c)}function jr(m){return he?(m||window).getSelection():null}function Fc(m,c){let h=m.getChildAtIndex(c);if(h==null&&(h=m),er(m))throw Error("Can not call $splitNode() on root element");const E=G=>{const K=G.getParentOrThrow(),be=er(K),ye=G===h&&!be?G:Vs(G);if(be)return G.insertAfter(ye),[G,ye,ye];{const[Ne,we,Ae]=E(K),Te=G.getNextSiblings();return Ae.append(ye,...Te),[Ne,we,ye]}},[S,$]=E(h);return[S,$]}function Di(m,c){let h=m;for(;h!==fr()&&h!=null;){if(c(h))return h;h=h.getParent()}return null}function cd(m){const c=[],h=[m];for(;h.length>0;){const E=h.pop();if(E===void 0)throw Error("Stack.length > 0; can't be undefined");rt(E)&&h.unshift(...E.getChildren()),E!==m&&c.push(E)}return c}function ki(m){return ri(m)&&m.tagName==="A"}function ri(m){return m.nodeType===1}function ha(m){if(Wn(m)&&!m.isInline())return!0;if(!rt(m)||er(m))return!1;const c=m.getFirstChild(),h=c===null||$o(c)||St(c)||c.isInline();return!m.isInline()&&m.canBeEmpty()!==!1&&h}function rs(m,c){let h=m;for(;h!==null&&h.getParent()!==null&&!c(h);)h=h.getParentOrThrow();return c(h)?h:null}function ud(m,c){const h=m._decorators;let E=m._pendingDecorators||h;const S=c._nodeMap;let $;for($ in E)S.has($)||(E===h&&(E=No(m)),delete E[$])}function jc(m,c,h,E,S,$){let G=m.getFirstChild();for(;G!==null;){const K=G.__key;G.__parent===c&&(rt(G)&&jc(G,K,h,E,S,$),h.has(K)||$.delete(K),S.push(K)),G=G.getNextSibling()}}function dd(m,c,h,E){const S=m._nodeMap,$=c._nodeMap,G=[];for(const[K]of E){const be=$.get(K);be!==void 0&&(be.isAttached()||(rt(be)&&jc(be,K,S,$,G,E),S.has(K)||E.delete(K),G.push(K)))}for(const K of G)$.delete(K);for(const K of h){const be=$.get(K);be!==void 0&&!be.isAttached()&&(S.has(K)||h.delete(K),$.delete(K))}}let jn="",pr="",po="",go,xr,Mi,pn=!1,oi=!1,Pi,os=null,Bc,pa,ii,Ao,qs,Ii;function Zs(m,c){const h=ii.get(m);if(c!==null){const E=Qs(m);E.parentNode===c&&c.removeChild(E)}if(Ao.has(m)||xr._keyToDOMMap.delete(m),rt(h)){const E=Xs(h,ii);Bn(E,0,E.length-1,null)}h!==void 0&&es(Ii,Mi,Pi,h,"destroyed")}function Bn(m,c,h,E){let S=c;for(;S<=h;++S){const $=m[S];$!==void 0&&Zs($,E)}}function bn(m,c){m.setProperty("text-align",c)}const wr="40px";function Js(m,c){const h=go.theme.indent;if(typeof h=="string"){const S=m.classList.contains(h);c>0&&!S?m.classList.add(h):c<1&&S&&m.classList.remove(h)}const E=getComputedStyle(m).getPropertyValue("--lexical-indent-base-value")||wr;m.style.setProperty("padding-inline-start",c===0?"":`calc(${c} * ${E})`)}function ga(m,c){const h=m.style;c===0?bn(h,""):c===wt?bn(h,"left"):c===_t?bn(h,"center"):c===Rt?bn(h,"right"):c===qe?bn(h,"justify"):c===ot?bn(h,"start"):c===yt&&bn(h,"end")}function is(m,c,h){const E=Ao.get(m);if(E===void 0)throw Error("createNode: node does not exist in nodeMap");const S=E.createDOM(go,xr);if(Pr(m,S,xr),St(E)?S.setAttribute("data-lexical-text","true"):Wn(E)&&S.setAttribute("data-lexical-decorator","true"),rt(E)){const $=E.__indent,G=E.__size;if($!==0&&Js(S,$),G!==0){const be=G-1,ye=Xs(E,Ao);ma(ye,be,E,S)}const K=E.__format;K!==0&&ga(S,K),E.isInline()||_n(null,E,S),Gs(E)&&(jn+=Kt,po+=Kt)}else{const $=E.getTextContent();if(Wn(E)){const G=E.decorate(xr,go);G!==null&&ai(m,G),S.contentEditable="false"}else St(E)&&(E.isDirectionless()||(pr+=$));jn+=$,po+=$}if(c!==null)if(h!=null)c.insertBefore(S,h);else{const $=c.__lexicalLineBreak;$!=null?c.insertBefore(S,$):c.appendChild(S)}return Object.freeze(E),es(Ii,Mi,Pi,E,"created"),S}function ma(m,c,h,E){const S=pr;pr="",tr(m,h,0,c,E,null),Wc(h,E),pr=S}function tr(m,c,h,E,S,$){const G=jn;jn="";let K=h;for(;K<=E;++K)is(m[K],S,$);Gs(c)&&(jn+=Kt),S.__lexicalTextContent=jn,jn=G+jn}function Jr(m,c){const h=c.get(m);return $o(h)||Wn(h)&&h.isInline()}function _n(m,c,h){const E=m!==null&&(m.__size===0||Jr(m.__last,ii)),S=c.__size===0||Jr(c.__last,Ao);if(E){if(!S){const $=h.__lexicalLineBreak;$!=null&&h.removeChild($),h.__lexicalLineBreak=null}}else if(S){const $=document.createElement("br");h.__lexicalLineBreak=$,h.appendChild($)}}function Wc(m,c){const h=c.__lexicalDirTextContent,E=c.__lexicalDir;if(h!==pr||E!==os){const S=pr==="",$=S?os:wc(pr);if($!==E){const G=c.classList,K=go.theme;let be=E!==null?K[E]:void 0,ye=$!==null?K[$]:void 0;if(be!==void 0){if(typeof be=="string"){const Ne=be.split(" ");be=K[E]=Ne}G.remove(...be)}if($===null||S&&$==="ltr")c.removeAttribute("dir");else{if(ye!==void 0){if(typeof ye=="string"){const Ne=ye.split(" ");ye=K[$]=Ne}ye!==void 0&&G.add(...ye)}c.dir=$}if(!oi){const Ne=m.getWritable();Ne.__dir=$}}os=$,c.__lexicalDirTextContent=pr,c.__lexicalDir=$}}function _h(m,c,h){const E=pr;pr="",zc(m,c,h),Wc(c,h),pr=E}function Xs(m,c){const h=[];let E=m.__first;for(;E!==null;){const S=c.get(E);if(S===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");h.push(E),E=S.__next}return h}function zc(m,c,h){const E=jn,S=m.__size,$=c.__size;if(jn="",S===1&&$===1){const G=m.__first,K=c.__first;if(G===K)ya(G,h);else{const be=Qs(G),ye=is(K,null,null);h.replaceChild(ye,be),Zs(G,null)}}else{const G=Xs(m,ii),K=Xs(c,Ao);if(S===0)$!==0&&tr(K,c,0,$-1,h,null);else if($===0){if(S!==0){const be=h.__lexicalLineBreak==null;Bn(G,0,S-1,be?null:h),be&&(h.textContent="")}}else fd(c,G,K,S,$,h)}Gs(c)&&(jn+=Kt),h.__lexicalTextContent=jn,jn=E+jn}function ya(m,c){const h=ii.get(m);let E=Ao.get(m);if(h===void 0||E===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const S=pn||pa.has(m)||Bc.has(m),$=ts(xr,m);if(h===E&&!S){if(rt(h)){const G=$.__lexicalTextContent;G!==void 0&&(jn+=G,po+=G);const K=$.__lexicalDirTextContent;K!==void 0&&(pr+=K)}else{const G=h.getTextContent();St(h)&&!h.isDirectionless()&&(pr+=G),po+=G,jn+=G}return $}if(h!==E&&S&&es(Ii,Mi,Pi,E,"updated"),E.updateDOM(h,$,go)){const G=is(m,null,null);if(c===null)throw Error("reconcileNode: parentDOM is null");return c.replaceChild(G,$),Zs(m,null),G}if(rt(h)&&rt(E)){const G=E.__indent;G!==h.__indent&&Js($,G);const K=E.__format;K!==h.__format&&ga($,K),S&&(_h(h,E,$),!to(E)&&!E.isInline()&&_n(h,E,$)),Gs(E)&&(jn+=Kt,po+=Kt)}else{const G=E.getTextContent();if(Wn(E)){const K=E.decorate(xr,go);K!==null&&ai(m,K)}else St(E)&&!E.isDirectionless()&&(pr+=G);jn+=G,po+=G}return!oi&&to(E)&&E.__cachedText!==po&&(E=E.getWritable(),E.__cachedText=po),Object.freeze(E),$}function ai(m,c){let h=xr._pendingDecorators;const E=xr._decorators;if(h===null){if(E[m]===c)return;h=No(xr)}h[m]=c}function as(m){return m.firstChild}function pt(m){let c=m.nextSibling;return c!==null&&c===xr._blockCursorElement&&(c=c.nextSibling),c}function fd(m,c,h,E,S,$){const G=E-1,K=S-1;let be,ye,Ne=as($),we=0,Ae=0;for(;we<=G&&Ae<=K;){const Le=c[we],Je=h[Ae];if(Le===Je)Ne=pt(ya(Je,$)),we++,Ae++;else{be===void 0&&(be=new Set(c)),ye===void 0&&(ye=new Set(h));const ft=ye.has(Le),Ye=be.has(Je);if(!ft)Ne=pt(Qs(Le)),Zs(Le,$),we++;else if(!Ye)is(Je,$,Ne),Ae++;else{const Ft=ts(xr,Je);Ft===Ne?Ne=pt(ya(Je,$)):(Ne!=null?$.insertBefore(Ft,Ne):$.appendChild(Ft),ya(Je,$)),we++,Ae++}}}const Te=we>G,He=Ae>K;if(Te&&!He){const Le=h[K+1],Je=Le===void 0?null:xr.getElementByKey(Le);tr(h,m,Ae,K,$,Je)}else He&&!Te&&Bn(c,we,G,$)}function hd(m,c,h,E,S,$){jn="",po="",pr="",pn=E===Ct,os=null,xr=h,go=h._config,Mi=h._nodes,Pi=xr._listeners.mutation,Bc=S,pa=$,ii=m._nodeMap,Ao=c._nodeMap,oi=c._readOnly,qs=new Map(h._keyToDOMMap);const G=new Map;return Ii=G,ya("root",null),xr=void 0,Mi=void 0,Bc=void 0,pa=void 0,ii=void 0,Ao=void 0,go=void 0,qs=void 0,Ii=void 0,G}function Pr(m,c,h){const E=h._keyToDOMMap;c["__lexicalKey_"+h._key]=m,E.set(m,c)}function Qs(m){const c=qs.get(m);if(c===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${m}`);return c}const on=Object.freeze({}),Ro=30,nt=[["keydown",A],["pointerdown",Br],["compositionstart",s],["compositionend",x],["input",f],["click",Gc],["cut",on],["copy",on],["dragstart",on],["dragover",on],["dragend",on],["paste",on],["focus",on],["blur",on],["drop",on]];Be&&nt.push(["beforeinput",(m,c)=>ls(m,c)]);let va=0,Li=0,Tr=0,ba=null,Fi=0,el=!1,_a=!1,mo=!1,ss=!1,yo=[0,"",0,"root",0];function Hc(m,c,h,E,S){const $=m.anchor,G=m.focus,K=$.getNode(),be=$n(),ye=jr(be._window),Ne=ye!==null?ye.anchorNode:null,we=$.key,Ae=be.getElementByKey(we),Te=h.length;return we!==G.key||!St(K)||(!S&&(!Be||Tr<E+50)||K.isDirty()&&Te<2||Sc(h))&&$.offset!==G.offset&&!K.isComposing()||Ls(K)||K.isDirty()&&Te>1||(S||!Be)&&Ae!==null&&!K.isComposing()&&Ne!==An(Ae)||ye!==null&&c!==null&&(!c.collapsed||c.startContainer!==ye.anchorNode||c.startOffset!==ye.anchorOffset)||K.getFormat()!==m.format||K.getStyle()!==m.style||Rc(m,K)}function pd(m,c){return m!==null&&m.nodeValue!==null&&m.nodeType===Xe&&c!==0&&c!==m.nodeValue.length}function gd(m,c,h){const{anchorNode:E,anchorOffset:S,focusNode:$,focusOffset:G}=m;el&&(el=!1,pd(E,S)&&pd($,G))||eo(c,()=>{if(!h){hr(null);return}if(!Qo(c,E,$))return;const K=xn();if(Tt(K)){const be=K.anchor,ye=be.getNode();if(K.isCollapsed()){m.type==="Range"&&m.anchorNode===m.focusNode&&(K.dirty=!0);const Ne=Oo(c).event,we=Ne?Ne.timeStamp:performance.now(),[Ae,Te,He,Le,Je]=yo,ft=fr(),Ye=c.isComposing()===!1&&ft.getTextContent()==="";we<Je+200&&be.offset===He&&be.key===Le?(K.format=Ae,K.style=Te):be.type==="text"?(K.format=ye.getFormat(),K.style=ye.getStyle()):be.type==="element"&&!Ye&&(K.format=0,K.style="")}else{let Ne=Qe,we=!1;const Ae=K.getNodes(),Te=Ae.length;for(let He=0;He<Te;He++){const Le=Ae[He];if(St(Le)&&(we=!0,Ne&=Le.getFormat(),Ne===0))break}K.format=we?Ne:0}}mt(c,t,void 0)})}function Gc(m,c){eo(c,()=>{const h=xn(),E=jr(c._window),S=sl();if(E){if(Tt(h)){const $=h.anchor,G=$.getNode();if($.type==="element"&&$.offset===0&&h.isCollapsed()&&!to(G)&&fr().getChildrenSize()===1&&G.getTopLevelElementOrThrow().isEmpty()&&S!==null&&h.is(S))E.removeAllRanges(),h.dirty=!0;else if(m.detail===3&&!h.isCollapsed()){const K=h.focus.getNode();G!==K&&(rt(G)?G.select(0):G.getParentOrThrow().select(0))}}else if(m.pointerType==="touch"){const $=E.anchorNode;if($!==null){const G=$.nodeType;if(G===We||G===Xe){const K=Ch(S,E,c);hr(K)}}}}mt(c,n,m)})}function Br(m,c){const h=m.target,E=m.pointerType;h instanceof Node&&E!=="touch"&&eo(c,()=>{Is(h)||(_a=!0)})}function Kc(m){if(!m.getTargetRanges)return null;const c=m.getTargetRanges();return c.length===0?null:c[0]}function Uc(m,c){return m!==c||rt(m)||rt(c)||!m.isToken()||!c.isToken()}function md(m){return Li===229&&m<va+Ro}function ls(m,c){const h=m.inputType,E=Kc(m);h==="deleteCompositionText"||Oe&&ei(c)||h!=="insertCompositionText"&&eo(c,()=>{const S=xn();if(h==="deleteContentBackward"){if(S===null){const Ne=sl();if(!Tt(Ne))return;hr(Ne.clone())}if(Tt(S)){if(ve&&Mn(S.anchor.key),md(m.timeStamp)&&c.isComposing()&&S.anchor.key===S.focus.key){if(Mn(null),va=0,setTimeout(()=>{eo(c,()=>{Mn(null)})},Ro),Tt(S)){const Ne=S.anchor.getNode();Ne.markDirty(),S.format=Ne.getFormat(),S.style=Ne.getStyle()}S.anchor.getNode().getTextContent().length<=1&&(m.preventDefault(),mt(c,r,!0))}else m.preventDefault(),mt(c,r,!0);return}}if(!Tt(S))return;const $=m.data;ba!==null&&Si(!1,c,ba),(!S.dirty||ba!==null)&&S.isCollapsed()&&!to(S.anchor.getNode())&&E!==null&&S.applyDOMRange(E),ba=null;const G=S.anchor,K=S.focus,be=G.getNode(),ye=K.getNode();if(h==="insertText"||h==="insertTranspose"){if($===`
|
|
234
|
+
`)m.preventDefault(),mt(c,o,!1);else if($===Kt)m.preventDefault(),mt(c,i,void 0);else if($==null&&m.dataTransfer){const Ne=m.dataTransfer.getData("text/plain");m.preventDefault(),S.insertRawText(Ne)}else $!=null&&Hc(S,E,$,m.timeStamp,!0)?(m.preventDefault(),mt(c,a,$)):ba=$;Tr=m.timeStamp;return}switch(m.preventDefault(),h){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{mt(c,a,m);break}case"insertFromComposition":{Mn(null),mt(c,a,m);break}case"insertLineBreak":{Mn(null),mt(c,o,!1);break}case"insertParagraph":{Mn(null),mo&&!le?(mo=!1,mt(c,o,!1)):mt(c,i,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{mt(c,l,m);break}case"deleteByComposition":{Uc(be,ye)&&mt(c,u,m);break}case"deleteByDrag":case"deleteByCut":{mt(c,u,m);break}case"deleteContent":{mt(c,r,!1);break}case"deleteWordBackward":{mt(c,p,!0);break}case"deleteWordForward":{mt(c,p,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{mt(c,g,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{mt(c,g,!1);break}case"formatStrikeThrough":{mt(c,_,"strikethrough");break}case"formatBold":{mt(c,_,"bold");break}case"formatItalic":{mt(c,_,"italic");break}case"formatUnderline":{mt(c,_,"underline");break}case"historyUndo":{mt(c,C,void 0);break}case"historyRedo":{mt(c,b,void 0);break}}})}function f(m,c){m.stopPropagation(),eo(c,()=>{const h=xn(),E=m.data,S=Kc(m);if(E!=null&&Tt(h)&&Hc(h,S,E,m.timeStamp,!1)){ss&&(d(c,E),ss=!1);const $=h.anchor,G=$.getNode(),K=jr(c._window);if(K===null)return;const be=$.offset;(!Be||h.isCollapsed()||!St(G)||K.anchorNode===null||G.getTextContent().slice(0,be)+E+G.getTextContent().slice(be+h.focus.offset)!==Va(K.anchorNode))&&mt(c,a,E);const ye=E.length;Oe&&ye>1&&m.inputType==="insertCompositionText"&&!c.isComposing()&&(h.anchor.offset-=ye),!ce&&!le&&!Pe&&c.isComposing()&&(va=0,Mn(null))}else Si(!1,c,E!==null?E:void 0),ss&&(d(c,E||void 0),ss=!1);Xu()}),ba=null}function s(m,c){eo(c,()=>{const h=xn();if(Tt(h)&&!c.isComposing()){const E=h.anchor,S=h.anchor.getNode();Mn(E.key),(m.timeStamp<va+Ro||E.type==="element"||!h.isCollapsed()||S.getFormat()!==h.format||S.getStyle()!==h.style)&&mt(c,a,sn)}})}function d(m,c){const h=m._compositionKey;if(Mn(null),h!==null&&c!=null){if(c===""){const E=Ln(h),S=An(m.getElementByKey(h));S!==null&&S.nodeValue!==null&&St(E)&&zs(E,S.nodeValue,null,null,!0);return}if(c[c.length-1]===`
|
|
235
|
+
`){const E=xn();if(Tt(E)){const S=E.focus;E.anchor.set(S.key,S.offset,S.type),mt(m,M,null);return}}}Si(!0,m,c)}function x(m,c){Oe?ss=!0:eo(c,()=>{d(c,m.data)})}function A(m,c){if(va=m.timeStamp,Li=m.keyCode,c.isComposing())return;const{keyCode:h,shiftKey:E,ctrlKey:S,metaKey:$,altKey:G}=m;if(!mt(c,y,m)){if(gh(h,S,G,$))mt(c,v,m);else if(mh(h,S,E,G,$))mt(c,T,m);else if(ph(h,S,G,$))mt(c,O,m);else if(Pc(h,S,E,G,$))mt(c,R,m);else if(ad(h,S,$))mt(c,k,m);else if(sa(h,S,$))mt(c,P,m);else if(aa(h,E))mo=!0,mt(c,M,m);else if(yh(h))mt(c,Y,m);else if(qa(h,S))m.preventDefault(),mo=!0,mt(c,o,!0);else if(ed(h,E))mo=!1,mt(c,M,m);else if(td(h,G,$,S))Xa(h)?mt(c,X,m):(m.preventDefault(),mt(c,r,!0));else if(ca(h))mt(c,oe,m);else if(nd(h,S,E,G,$))Qa(h)?mt(c,Z,m):(m.preventDefault(),mt(c,r,!1));else if(Dc(h,G,S))m.preventDefault(),mt(c,p,!0);else if(kc(h,G,S))m.preventDefault(),mt(c,p,!1);else if(Za(h,$))m.preventDefault(),mt(c,g,!0);else if(Ja(h,$))m.preventDefault(),mt(c,g,!1);else if($c(h,G,$,S))m.preventDefault(),mt(c,_,"bold");else if(Qu(h,G,$,S))m.preventDefault(),mt(c,_,"underline");else if(Ya(h,G,$,S))m.preventDefault(),mt(c,_,"italic");else if(So(h,G,S,$))mt(c,U,m);else if(rd(h,E,$,S))m.preventDefault(),mt(c,C,void 0);else if(od(h,E,$,S))m.preventDefault(),mt(c,b,void 0);else{const K=c._editorState._selection;gr(K)?uh(h,E,$,S)?(m.preventDefault(),mt(c,ne,m)):dh(h,E,$,S)?(m.preventDefault(),mt(c,B,m)):Ai(h,$,S)&&(m.preventDefault(),mt(c,W,m)):!Oe&&Ai(h,$,S)&&(m.preventDefault(),mt(c,W,m))}sd(S,E,G,$)&&mt(c,ue,m)}}function D(m){let c=m.__lexicalEventHandles;return c===void 0&&(c=[],m.__lexicalEventHandles=c),c}const z=new Map;function ie(m){const c=m.target,h=c==null?null:c.nodeType===9?c.defaultView:c.ownerDocument.defaultView,E=jr(h);if(E===null)return;const S=Ti(E.anchorNode);if(S===null)return;_a&&(_a=!1,eo(S,()=>{const Ne=sl(),we=E.anchorNode;if(we===null)return;const Ae=we.nodeType;if(Ae!==We&&Ae!==Xe)return;const Te=Ch(Ne,E,S);hr(Te)}));const $=Ws(S),G=$[$.length-1],K=G._key,be=z.get(K),ye=be||G;ye!==S&&gd(E,ye,!1),gd(E,S,!0),S!==G?z.set(K,S):be&&z.delete(K)}function xe(m){m._lexicalHandled=!0}function Re(m){return m._lexicalHandled===!0}function Ve(m,c){Fi===0&&m.ownerDocument.addEventListener("selectionchange",ie),Fi++,m.__lexicalEditor=c;const h=D(m);for(let E=0;E<nt.length;E++){const[S,$]=nt[E],G=typeof $=="function"?K=>{Re(K)||(xe(K),c.isEditable()&&$(K,c))}:K=>{if(!Re(K)&&(xe(K),c.isEditable()))switch(S){case"cut":return mt(c,B,K);case"copy":return mt(c,ne,K);case"paste":return mt(c,l,K);case"dragstart":return mt(c,V,K);case"dragover":return mt(c,j,K);case"dragend":return mt(c,ee,K);case"focus":return mt(c,I,K);case"blur":return mt(c,q,K);case"drop":return mt(c,te,K)}};m.addEventListener(S,G),h.push(()=>{m.removeEventListener(S,G)})}}function Ze(m){Fi!==0&&(Fi--,Fi===0&&m.ownerDocument.removeEventListener("selectionchange",ie));const c=m.__lexicalEditor;c!=null&&(Ge(c),m.__lexicalEditor=null);const h=D(m);for(let E=0;E<h.length;E++)h[E]();m.__lexicalEventHandles=[]}function Ge(m){if(m._parentEditor!==null){const c=Ws(m),h=c[c.length-1]._key;z.get(h)===m&&z.delete(h)}else z.delete(m._key)}function Ie(){el=!0}function it(m,c,h,E,S){yo=[m,c,h,E,S]}function vt(m,c,h){Sr();const E=m.__key,S=m.getParent();if(S===null)return;const $=ti(m);let G=!1;if(Tt($)&&c){const K=$.anchor,be=$.focus;K.key===E&&(Ed(K,m,S,m.getPreviousSibling(),m.getNextSibling()),G=!0),be.key===E&&(Ed(be,m,S,m.getPreviousSibling(),m.getNextSibling()),G=!0)}else gr($)&&c&&m.isSelected()&&m.selectPrevious();if(Tt($)&&c&&!G){const K=m.getIndexWithinParent();Yr(m),xd($,S,K,-1)}else Yr(m);!h&&!er(S)&&!S.canBeEmpty()&&S.isEmpty()&&vt(S,c),c&&to(S)&&S.isEmpty()&&S.selectEnd()}class $t{static getType(){throw Error(`LexicalNode: Node ${this.name} does not implement .getType().`)}static clone(c){throw Error(`LexicalNode: Node ${this.name} does not implement .clone().`)}constructor(c){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,To(this,c),this.__type!=="root"&&(Sr(),Vt(this.__type,this.constructor))}getType(){return this.__type}isAttached(){let c=this.__key;for(;c!==null;){if(c==="root")return!0;const h=Ln(c);if(h===null)break;c=h.__parent}return!1}isSelected(c){const h=c||xn();if(h==null)return!1;const E=h.getNodes().some(S=>S.__key===this.__key);return St(this)?E:Tt(h)&&h.anchor.type==="element"&&h.focus.type==="element"&&h.anchor.key===h.focus.key&&h.anchor.offset===h.focus.offset?!1:E}getKey(){return this.__key}getIndexWithinParent(){const c=this.getParent();if(c===null)return-1;let h=c.getFirstChild(),E=0;for(;h!==null;){if(this.is(h))return E;E++,h=h.getNextSibling()}return-1}getParent(){const c=this.getLatest().__parent;return c===null?null:Ln(c)}getParentOrThrow(){const c=this.getParent();if(c===null)throw Error(`Expected node ${this.__key} to have a parent.`);return c}getTopLevelElement(){let c=this;for(;c!==null;){const h=c.getParent();if(er(h))return c;c=h}return null}getTopLevelElementOrThrow(){const c=this.getTopLevelElement();if(c===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return c}getParents(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h),h=h.getParent();return c}getParentKeys(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h.__key),h=h.getParent();return c}getPreviousSibling(){const c=this.getLatest().__prev;return c===null?null:Ln(c)}getPreviousSiblings(){const c=[],h=this.getParent();if(h===null)return c;let E=h.getFirstChild();for(;E!==null&&!E.is(this);)c.push(E),E=E.getNextSibling();return c}getNextSibling(){const c=this.getLatest().__next;return c===null?null:Ln(c)}getNextSiblings(){const c=[];let h=this.getNextSibling();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getCommonAncestor(c){const h=this.getParents(),E=c.getParents();rt(this)&&h.unshift(this),rt(c)&&E.unshift(c);const S=h.length,$=E.length;if(S===0||$===0||h[S-1]!==E[$-1])return null;const G=new Set(E);for(let K=0;K<S;K++){const be=h[K];if(G.has(be))return be}return null}is(c){return c==null?!1:this.__key===c.__key}isBefore(c){if(this===c)return!1;if(c.isParentOf(this))return!0;if(this.isParentOf(c))return!1;const h=this.getCommonAncestor(c);let E=0,S=0,$=this;for(;;){const G=$.getParentOrThrow();if(G===h){E=$.getIndexWithinParent();break}$=G}for($=c;;){const G=$.getParentOrThrow();if(G===h){S=$.getIndexWithinParent();break}$=G}return E<S}isParentOf(c){const h=this.__key;if(h===c.__key)return!1;let E=c;for(;E!==null;){if(E.__key===h)return!0;E=E.getParent()}return!1}getNodesBetween(c){const h=this.isBefore(c),E=[],S=new Set;let $=this;for(;;){const G=$.__key;if(S.has(G)||(S.add(G),E.push($)),$===c)break;const K=rt($)?h?$.getFirstChild():$.getLastChild():null;if(K!==null){$=K;continue}const be=h?$.getNextSibling():$.getPreviousSibling();if(be!==null){$=be;continue}const ye=$.getParentOrThrow();if(S.has(ye.__key)||E.push(ye),ye===c)break;let Ne=null,we=ye;do{if(we===null)throw Error("getNodesBetween: ancestor is null");Ne=h?we.getNextSibling():we.getPreviousSibling(),we=we.getParent(),we!==null&&Ne===null&&!S.has(we.__key)&&E.push(we)}while(Ne===null);$=Ne}return h||E.reverse(),E}isDirty(){const c=$n()._dirtyLeaves;return c!==null&&c.has(this.__key)}getLatest(){const c=Ln(this.__key);if(c===null)throw Error("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update.");return c}getWritable(){Sr();const c=ui(),h=$n(),E=c._nodeMap,S=this.__key,$=this.getLatest(),G=$.__parent,K=h._cloneNotNeeded,be=xn();if(rr(be)&&be.setCachedNodes(null),K.has(S))return Ga($),$;const ye=$.constructor.clone($);return ye.__parent=G,ye.__next=$.__next,ye.__prev=$.__prev,rt($)&&rt(ye)?(ye.__first=$.__first,ye.__last=$.__last,ye.__size=$.__size,ye.__indent=$.__indent,ye.__format=$.__format,ye.__dir=$.__dir):St($)&&St(ye)&&(ye.__format=$.__format,ye.__style=$.__style,ye.__mode=$.__mode,ye.__detail=$.__detail),K.add(S),ye.__key=S,Ga(ye),E.set(S,ye),ye}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(c,h){throw Error("createDOM: base method not extended")}updateDOM(c,h,E){throw Error("updateDOM: base method not extended")}exportDOM(c){return{element:this.createDOM(c._config,c)}}exportJSON(){throw Error("exportJSON: base method not extended")}static importJSON(c){throw Error(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}static transform(){return null}remove(c){vt(this,!0,c)}replace(c,h){Sr();let E=xn();E!==null&&(E=E.clone()),Ys(this,c);const S=this.getLatest(),$=this.__key,G=c.__key,K=c.getWritable(),be=this.getParentOrThrow().getWritable(),ye=be.__size;Yr(K);const Ne=S.getPreviousSibling(),we=S.getNextSibling(),Ae=S.__prev,Te=S.__next,He=S.__parent;if(vt(S,!1,!0),Ne===null)be.__first=G;else{const Le=Ne.getWritable();Le.__next=G}if(K.__prev=Ae,we===null)be.__last=G;else{const Le=we.getWritable();Le.__prev=G}if(K.__next=Te,K.__parent=He,be.__size=ye,h&&this.getChildren().forEach(Le=>{K.append(Le)}),Tt(E)){hr(E);const Le=E.anchor,Je=E.focus;Le.key===$&&ol(Le,K),Je.key===$&&ol(Je,K)}return qr()===$&&Mn(G),K}insertAfter(c,h=!0){Sr(),Ys(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.getParent(),G=xn();let K=!1,be=!1;if($!==null){const Te=c.getIndexWithinParent();if(Yr(S),Tt(G)){const He=$.__key,Le=G.anchor,Je=G.focus;K=Le.type==="element"&&Le.key===He&&Le.offset===Te+1,be=Je.type==="element"&&Je.key===He&&Je.offset===Te+1}}const ye=this.getNextSibling(),Ne=this.getParentOrThrow().getWritable(),we=S.__key,Ae=E.__next;if(ye===null)Ne.__last=we;else{const Te=ye.getWritable();Te.__prev=we}if(Ne.__size++,E.__next=we,S.__next=Ae,S.__prev=E.__key,S.__parent=E.__parent,h&&Tt(G)){const Te=this.getIndexWithinParent();xd(G,Ne,Te+1);const He=Ne.__key;K&&G.anchor.set(He,Te+2,"element"),be&&G.focus.set(He,Te+2,"element")}return c}insertBefore(c,h=!0){Sr(),Ys(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.__key;Yr(S);const G=this.getPreviousSibling(),K=this.getParentOrThrow().getWritable(),be=E.__prev,ye=this.getIndexWithinParent();if(G===null)K.__first=$;else{const we=G.getWritable();we.__next=$}K.__size++,E.__prev=$,S.__prev=be,S.__next=E.__key,S.__parent=E.__parent;const Ne=xn();if(h&&Tt(Ne)){const we=this.getParentOrThrow();xd(Ne,we,ye)}return c}isParentRequired(){return!1}createParentElementNode(){return Bi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(c,h){Sr();const E=this.getPreviousSibling(),S=this.getParentOrThrow();if(E===null)return S.select(0,0);if(rt(E))return E.select();if(!St(E)){const $=E.getIndexWithinParent()+1;return S.select($,$)}return E.select(c,h)}selectNext(c,h){Sr();const E=this.getNextSibling(),S=this.getParentOrThrow();if(E===null)return S.select();if(rt(E))return E.select(0,0);if(!St(E)){const $=E.getIndexWithinParent();return S.select($,$)}return E.select(c,h)}markDirty(){this.getWritable()}}function Vt(m,c){const h=$n()._nodes.get(m);if(h===void 0)throw Error(`Create node: Attempted to create node ${c.name} that was not configured to be used on the editor.`);const E=h.klass;if(E!==c)throw Error(`Create node: Type ${m} in node ${c.name} does not match registered node ${E.name} with the same type`)}function Rn(m,c,h){const E=c.getParentOrThrow().getLastChild();let S=c;const $=[c];for(;S!==E;){if(!S.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");S=S.getNextSibling(),$.push(S)}let G=m;for(const K of $)G=G.insertAfter(K)}class Jn extends $t{static getType(){return"linebreak"}static clone(c){return new Jn(c.__key)}constructor(c){super(c)}getTextContent(){return`
|
|
236
|
+
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:c=>{const h=c.parentElement;let E,S;return h!==null&&((E=h.firstChild)===c||E.nextSibling===c&&E.nodeType===Xe&&(E.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((S=h.lastChild)===c||S.previousSibling===c&&S.nodeType===Xe&&(S.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:cs,priority:0}}}}static importJSON(c){return Nr()}exportJSON(){return{type:"linebreak",version:1}}}function cs(m){return{node:Nr()}}function Nr(){return da(new Jn)}function $o(m){return m instanceof Jn}function tl(m,c){return c&tt?"code":c&Bt?"mark":c&ut?"sub":c&Et?"sup":null}function xa(m,c){return c&De?"strong":c&Fe?"em":"span"}function yd(m,c,h,E,S){const $=E.classList;let G=$i(S,"base");G!==void 0&&$.add(...G),G=$i(S,"underlineStrikethrough");let K=!1;const be=c&ze&&c&ke,ye=h&ze&&h&ke;G!==void 0&&(ye?(K=!0,be||$.add(...G)):be&&$.remove(...G));for(const Ne in Cr){const we=Cr[Ne];if(G=$i(S,Ne),G!==void 0)if(h&we){if(K&&(Ne==="underline"||Ne==="strikethrough")){c&we&&$.remove(...G);continue}(!(c&we)||be&&Ne==="underline"||Ne==="strikethrough")&&$.add(...G)}else c&we&&$.remove(...G)}}function Vc(m,c){const h=m.length,E=c.length;let S=0,$=0;for(;S<h&&S<E&&m[S]===c[S];)S++;for(;$+S<h&&$+S<E&&m[h-$-1]===c[E-$-1];)$++;return[S,h-S-$,c.slice(S,E-$)]}function Xr(m,c,h){const E=c.firstChild,S=h.isComposing(),$=m+(S?Dt:"");if(E==null)c.textContent=$;else{const G=E.nodeValue;if(G!==$)if(S||Oe){const[K,be,ye]=Vc(G,$);be!==0&&E.deleteData(K,be),E.insertData(K,ye)}else E.nodeValue=$}}function Ea(m,c,h,E,S,$){Xr(S,m,c);const G=$.theme.text;G!==void 0&&yd(h,0,E,m,G)}function Ca(m,c){const h=document.createElement(c);return h.appendChild(m),h}class si extends $t{static getType(){return"text"}static clone(c){return new si(c.__text,c.__key)}constructor(c,h){super(h),this.__text=c,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const c=this.getLatest();return Ee[c.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===me}isComposing(){return this.__key===qr()}isSegmented(){return this.getLatest().__mode===_e}isDirectionless(){return(this.getLatest().__detail&et)!==0}isUnmergeable(){return(this.getLatest().__detail<)!==0}hasFormat(c){const h=Cr[c];return(this.getFormat()&h)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(c,h){const E=this.getLatest().__format;return Qn(E,c,h)}createDOM(c){const h=this.__format,E=tl(this,h),S=xa(this,h),$=E===null?S:E,G=document.createElement($);let K=G;this.hasFormat("code")&&G.setAttribute("spellcheck","false"),E!==null&&(K=document.createElement(S),G.appendChild(K));const be=this.__text;Ea(K,this,S,h,be,c);const ye=this.__style;return ye!==""&&(G.style.cssText=ye),G}updateDOM(c,h,E){const S=this.__text,$=c.__format,G=this.__format,K=tl(this,$),be=tl(this,G),ye=xa(this,$),Ne=xa(this,G);if((K===null?ye:K)!==(be===null?Ne:be))return!0;if(K===be&&ye!==Ne){const Le=h.firstChild;if(Le==null)throw Error("updateDOM: prevInnerDOM is null or undefined");const Je=document.createElement(Ne);return Ea(Je,this,Ne,G,S,E),h.replaceChild(Je,Le),!1}let we=h;if(be!==null&&K!==null&&(we=h.firstChild,we==null))throw Error("updateDOM: innerDOM is null or undefined");Xr(S,we,this);const Ae=E.theme.text;Ae!==void 0&&$!==G&&yd(Ne,$,G,we,Ae);const Te=c.__style,He=this.__style;return Te!==He&&(h.style.cssText=He),!1}static importDOM(){return{"#text":()=>({conversion:qc,priority:0}),b:()=>({conversion:vd,priority:0}),code:()=>({conversion:Qr,priority:0}),em:()=>({conversion:Qr,priority:0}),i:()=>({conversion:Qr,priority:0}),s:()=>({conversion:Qr,priority:0}),span:()=>({conversion:xh,priority:0}),strong:()=>({conversion:Qr,priority:0}),sub:()=>({conversion:Qr,priority:0}),sup:()=>({conversion:Qr,priority:0}),u:()=>({conversion:Qr,priority:0})}}static importJSON(c){const h=Kn(c.text);return h.setFormat(c.format),h.setDetail(c.detail),h.setMode(c.mode),h.setStyle(c.style),h}exportDOM(c){let{element:h}=super.exportDOM(c);if(!(h!==null&&ri(h)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return h.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(h=Ca(h,"b")),this.hasFormat("italic")&&(h=Ca(h,"i")),this.hasFormat("strikethrough")&&(h=Ca(h,"s")),this.hasFormat("underline")&&(h=Ca(h,"u")),{element:h}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(c,h){}setFormat(c){const h=this.getWritable();return h.__format=typeof c=="string"?Cr[c]:c,h}setDetail(c){const h=this.getWritable();return h.__detail=typeof c=="string"?qn[c]:c,h}setStyle(c){const h=this.getWritable();return h.__style=c,h}toggleFormat(c){const h=this.getFormat(),E=Qn(h,c,null);return this.setFormat(E)}toggleDirectionless(){const c=this.getWritable();return c.__detail^=et,c}toggleUnmergeable(){const c=this.getWritable();return c.__detail^=lt,c}setMode(c){const h=oa[c];if(this.__mode===h)return this;const E=this.getWritable();return E.__mode=h,E}setTextContent(c){if(this.__text===c)return this;const h=this.getWritable();return h.__text=c,h}select(c,h){Sr();let E=c,S=h;const $=xn(),G=this.getTextContent(),K=this.__key;if(typeof G=="string"){const be=G.length;E===void 0&&(E=be),S===void 0&&(S=be)}else E=0,S=0;if(Tt($)){const be=qr();(be===$.anchor.key||be===$.focus.key)&&Mn(K),$.setTextNodeRange(this,E,this,S)}else return Ey(K,E,K,S,"text","text");return $}selectStart(){return this.select(0,0)}selectEnd(){const c=this.getTextContentSize();return this.select(c,c)}spliceText(c,h,E,S){const $=this.getWritable(),G=$.__text,K=E.length;let be=c;be<0&&(be=K+be,be<0&&(be=0));const ye=xn();if(S&&Tt(ye)){const we=c+K;ye.setTextNodeRange($,we,$,we)}const Ne=G.slice(0,be)+E+G.slice(be+h);return $.__text=Ne,$}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...c){Sr();const h=this.getLatest(),E=h.getTextContent(),S=h.__key,$=qr(),G=new Set(c),K=[],be=E.length;let ye="";for(let jt=0;jt<be;jt++)ye!==""&&G.has(jt)&&(K.push(ye),ye=""),ye+=E[jt];ye!==""&&K.push(ye);const Ne=K.length;if(Ne===0)return[];if(K[0]===E)return[h];const we=K[0],Ae=h.getParentOrThrow();let Te;const He=h.getFormat(),Le=h.getStyle(),Je=h.__detail;let ft=!1;h.isSegmented()?(Te=Kn(we),Te.__format=He,Te.__style=Le,Te.__detail=Je,ft=!0):(Te=h.getWritable(),Te.__text=we);const Ye=xn(),Ft=[Te];let Ht=we.length;for(let jt=1;jt<Ne;jt++){const Jt=K[jt],un=Jt.length,Wt=Kn(Jt).getWritable();Wt.__format=He,Wt.__style=Le,Wt.__detail=Je;const zn=Wt.__key,Po=Ht+un;if(Tt(Ye)){const Wi=Ye.anchor,dl=Ye.focus;Wi.key===S&&Wi.type==="text"&&Wi.offset>Ht&&Wi.offset<=Po&&(Wi.key=zn,Wi.offset-=Ht,Ye.dirty=!0),dl.key===S&&dl.type==="text"&&dl.offset>Ht&&dl.offset<=Po&&(dl.key=zn,dl.offset-=Ht,Ye.dirty=!0)}$===S&&Mn(zn),Ht=Po,Ft.push(Wt)}Tc(this);const Pt=Ae.getWritable(),Zt=this.getIndexWithinParent();return ft?(Pt.splice(Zt,0,Ft),this.remove()):Pt.splice(Zt,1,Ft),Tt(Ye)&&xd(Ye,Ae,Zt,Ne-1),Ft}mergeWithSibling(c){const h=c===this.getPreviousSibling();if(!h&&c!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const E=this.__key,S=c.__key,$=this.__text,G=$.length;qr()===S&&Mn(E);const K=xn();if(Tt(K)){const we=K.anchor,Ae=K.focus;we!==null&&we.key===S&&(wy(we,h,E,c,G),K.dirty=!0),Ae!==null&&Ae.key===S&&(wy(Ae,h,E,c,G),K.dirty=!0)}const be=c.__text,ye=h?be+$:$+be;this.setTextContent(ye);const Ne=this.getWritable();return c.remove(),Ne}isTextEntity(){return!1}}function xh(m){const c=m,h=c.style.fontWeight==="700",E=c.style.textDecoration==="line-through",S=c.style.fontStyle==="italic",$=c.style.textDecoration==="underline",G=c.style.verticalAlign;return{forChild:K=>(St(K)&&(h&&K.toggleFormat("bold"),E&&K.toggleFormat("strikethrough"),S&&K.toggleFormat("italic"),$&&K.toggleFormat("underline"),G==="sub"&&K.toggleFormat("subscript"),G==="super"&&K.toggleFormat("superscript")),K),node:null}}function vd(m){const c=m.style.fontWeight==="normal";return{forChild:h=>(St(h)&&!c&&h.toggleFormat("bold"),h),node:null}}const Yc=new WeakMap;function nl(m){return m.nodeName==="PRE"||m.nodeType===We&&m.style!==void 0&&m.style.whiteSpace!==void 0&&m.style.whiteSpace.startsWith("pre")}function bd(m){let c,h=m.parentNode;const E=[m];for(;h!==null&&(c=Yc.get(h))===void 0&&!nl(h);)E.push(h),h=h.parentNode;const S=c===void 0?h:c;for(let $=0;$<E.length;$++)Yc.set(E[$],S);return S}function qc(m){const c=m;if(m.parentElement===null)throw Error("Expected parentElement of Text not to be null");let h=c.textContent||"";if(bd(c)!==null){const E=h.split(/(\r?\n|\t)/),S=[],$=E.length;for(let G=0;G<$;G++){const K=E[G];K===`
|
|
237
|
+
`||K===`\r
|
|
238
|
+
`?S.push(Nr()):K===" "?S.push(wa()):K!==""&&S.push(Kn(K))}return{node:S}}if(h=h.replace(/\r/g,"").replace(/[ \t\n]+/g," "),h==="")return{node:null};if(h[0]===" "){let E=c,S=!0;for(;E!==null&&(E=Jc(E,!1))!==null;){const $=E.textContent||"";if($.length>0){/[ \t\n]$/.test($)&&(h=h.slice(1)),S=!1;break}}S&&(h=h.slice(1))}if(h[h.length-1]===" "){let E=c,S=!0;for(;E!==null&&(E=Jc(E,!0))!==null;)if((E.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){S=!1;break}S&&(h=h.slice(0,h.length-1))}return h===""?{node:null}:{node:Kn(h)}}const Zc=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Jc(m,c){let h=m;for(;;){let E;for(;(E=c?h.nextSibling:h.previousSibling)===null;){const $=h.parentElement;if($===null)return null;h=$}if(h=E,h.nodeType===We){const $=h.style.display;if($===""&&h.nodeName.match(Zc)===null||$!==""&&!$.startsWith("inline"))return null}let S=h;for(;(S=c?h.firstChild:h.lastChild)!==null;)h=S;if(h.nodeType===Xe)return h;if(h.nodeName==="BR")return null}}const us={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Qr(m){const c=us[m.nodeName.toLowerCase()];return c===void 0?{node:null}:{forChild:h=>(St(h)&&!h.hasFormat(c)&&h.toggleFormat(c),h),node:null}}function Kn(m=""){return da(new si(m))}function St(m){return m instanceof si}class li extends si{static getType(){return"tab"}static clone(c){const h=new li(c.__key);return h.__text=c.__text,h.__format=c.__format,h.__style=c.__style,h}constructor(c){super(" ",c),this.__detail=lt}static importDOM(){return null}static importJSON(c){const h=wa();return h.setFormat(c.format),h.setStyle(c.style),h}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(c){throw Error("TabNode does not support setTextContent")}setDetail(c){throw Error("TabNode does not support setDetail")}setMode(c){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function wa(){return da(new li)}function ds(m){return m instanceof li}class rl{constructor(c,h,E){this._selection=null,this.key=c,this.offset=h,this.type=E}is(c){return this.key===c.key&&this.offset===c.offset&&this.type===c.type}isBefore(c){let h=this.getNode(),E=c.getNode();const S=this.offset,$=c.offset;return rt(h)&&(h=h.getDescendantByIndex(S)??h),rt(E)&&(E=E.getDescendantByIndex($)??E),h===E?S<$:h.isBefore(E)}getNode(){const c=this.key,h=Ln(c);if(h===null)throw Error("Point.getNode: node not found");return h}set(c,h,E){const S=this._selection,$=this.key;this.key=c,this.offset=h,this.type=E,ll()||(qr()===$&&Mn(c),S!==null&&(S.setCachedNodes(null),S.dirty=!0))}}function nr(m,c,h){return new rl(m,c,h)}function Xc(m,c){let h=c.__key,E=m.offset,S="element";if(St(c)){S="text";const $=c.getTextContentSize();E>$&&(E=$)}else if(!rt(c)){const $=c.getNextSibling();if(St($))h=$.__key,E=0,S="text";else{const G=c.getParent();G&&(h=G.__key,E=c.getIndexWithinParent()+1)}}m.set(h,E,S)}function ol(m,c){if(rt(c)){const h=c.getLastDescendant();rt(h)||St(h)?Xc(m,h):Xc(m,c)}else Xc(m,c)}function _d(m,c,h,E){const S=m.getNode(),$=S.getChildAtIndex(m.offset),G=Kn(),K=to(S)?Bi().append(G):G;G.setFormat(h),G.setStyle(E),$===null?S.append(K):$.insertBefore(K),m.is(c)&&c.set(G.__key,0,"text"),m.set(G.__key,0,"text")}function Do(m,c,h,E){m.key=c,m.offset=h,m.type=E}class il{constructor(c,h){this.anchor=c,this.focus=h,c._selection=this,h._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return rr(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Mo(this)}}class gn{constructor(c){this.dirty=!1,this._nodes=c,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){if(!gr(c))return!1;const h=this._nodes,E=c._nodes;return h.size===E.size&&Array.from(h).every(S=>E.has(S))}add(c){this.dirty=!0,this._nodes.add(c),this._cachedNodes=null}delete(c){this.dirty=!0,this._nodes.delete(c),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(c){return this._nodes.has(c)}clone(){return new gn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.getNodes(),E=h.length,S=h[E-1];let $;if(St(S))$=S.select();else{const G=S.getIndexWithinParent()+1;$=S.getParentOrThrow().select(G,G)}$.insertNodes(c);for(let G=0;G<E;G++)h[G].remove()}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this._nodes,E=[];for(const S of h){const $=Ln(S);$!==null&&E.push($)}return ll()||(this._cachedNodes=E),E}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Tt(m){return m instanceof or}function rr(m){return m instanceof il}function Wr(m){const[c,,h]=Ny(m),E=h.getChildren(),S=E.length,$=E[0].getChildren().length,G=new Array(S);for(let K=0;K<S;K++)G[K]=new Array($);for(let K=0;K<S;K++){const be=E[K].getChildren();let ye=0;for(let Ne=0;Ne<be.length;Ne++){for(;G[K][ye];)ye++;const we=be[Ne],Ae=we.__rowSpan||1,Te=we.__colSpan||1;for(let He=0;He<Ae;He++)for(let Le=0;Le<Te;Le++)G[K+He][ye+Le]=we;if(c===we)return{colSpan:Te,columnIndex:ye,rowIndex:K,rowSpan:Ae};ye+=Te}}return null}class ci extends il{constructor(c,h,E){super(h,E),this.gridKey=c}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Ir(c)?this.gridKey===c.gridKey&&this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}set(c,h,E){this.dirty=!0,this.gridKey=c,this.anchor.key=h,this.focus.key=E,this._cachedNodes=null}clone(){return new ci(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.focus.getNode();ia(h.select(0,h.getChildrenSize())).insertNodes(c)}getShape(){const c=Ln(this.anchor.key);if(!vo(c))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");const h=Wr(c);if(h===null)throw Error("getCellRect: expected to find AnchorNode");const E=Ln(this.focus.key);if(!vo(E))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const S=Wr(E);if(S===null)throw Error("getCellRect: expected to find focusCellNode");const $=Math.min(h.columnIndex,S.columnIndex),G=Math.max(h.columnIndex,S.columnIndex),K=Math.min(h.rowIndex,S.rowIndex),be=Math.max(h.rowIndex,S.rowIndex);return{fromX:Math.min($,G),fromY:Math.min(K,be),toX:Math.max($,G),toY:Math.max(K,be)}}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor.getNode(),E=this.focus.getNode(),S=Di(h,vo),$=Di(E,vo);if(!vo(S))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");if(!vo($))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const G=S.getParent();if(!tu(G))throw Error("Expected anchorCell to have a parent GridRowNode");const K=G.getParent();if(!Rh(K))throw Error("Expected tableNode to have a parent GridNode");const be=$.getParents()[1];if(be!==K){if(K.isParentOf($)){const jt=be.getParent();if(jt==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,$.getKey(),jt.getKey())}else{const jt=K.getParent();if(jt==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,jt.getKey(),$.getKey())}return this.getNodes()}const[ye,Ne,we]=Ty(K,S,$);let Ae=Math.min(Ne.startColumn,we.startColumn),Te=Math.min(Ne.startRow,we.startRow),He=Math.max(Ne.startColumn+Ne.cell.__colSpan-1,we.startColumn+we.cell.__colSpan-1),Le=Math.max(Ne.startRow+Ne.cell.__rowSpan-1,we.startRow+we.cell.__rowSpan-1),Je=Ae,ft=Te,Ye=Ae,Ft=Te;function Ht(jt){const{cell:Jt,startColumn:un,startRow:Wt}=jt;Ae=Math.min(Ae,un),Te=Math.min(Te,Wt),He=Math.max(He,un+Jt.__colSpan-1),Le=Math.max(Le,Wt+Jt.__rowSpan-1)}for(;Ae<Je||Te<ft||He>Ye||Le>Ft;){if(Ae<Je){const jt=Ft-ft,Jt=Je-1;for(let un=0;un<=jt;un++)Ht(ye[ft+un][Jt]);Je=Jt}if(Te<ft){const jt=Ye-Je,Jt=ft-1;for(let un=0;un<=jt;un++)Ht(ye[Jt][Je+un]);ft=Jt}if(He>Ye){const jt=Ft-ft,Jt=Ye+1;for(let un=0;un<=jt;un++)Ht(ye[ft+un][Jt]);Ye=Jt}if(Le>Ft){const jt=Ye-Je,Jt=Ft+1;for(let un=0;un<=jt;un++)Ht(ye[Jt][Je+un]);Ft=Jt}}const Pt=[K];let Zt=null;for(let jt=Te;jt<=Le;jt++)for(let Jt=Ae;Jt<=He;Jt++){const{cell:un}=ye[jt][Jt],Wt=un.getParent();if(!tu(Wt))throw Error("Expected GridCellNode parent to be a GridRowNode");Wt!==Zt&&Pt.push(Wt),Pt.push(un,...cd(un)),Zt=Wt}return ll()||(this._cachedNodes=Pt),Pt}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Ir(m){return m instanceof ci}class or extends il{constructor(c,h,E,S){super(c,h),this.format=E,this.style=S}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Tt(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus)&&this.format===c.format&&this.style===c.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor,E=this.focus,S=h.isBefore(E),$=S?h:E,G=S?E:h;let K=$.getNode(),be=G.getNode();const ye=$.offset,Ne=G.offset;if(rt(K)&&(K=K.getDescendantByIndex(ye)??K),rt(be)){let Ae=be.getDescendantByIndex(Ne);Ae!==null&&Ae!==K&&be.getChildAtIndex(Ne)===Ae&&(Ae=Ae.getPreviousSibling()),be=Ae??be}let we;return K.is(be)?rt(K)&&K.getChildrenSize()>0?we=[]:we=[K]:we=K.getNodesBetween(be),ll()||(this._cachedNodes=we),we}setTextNodeRange(c,h,E,S){Do(this.anchor,c.__key,h,"text"),Do(this.focus,E.__key,S,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const c=this.getNodes();if(c.length===0)return"";const h=c[0],E=c[c.length-1],S=this.anchor,$=this.focus,G=S.isBefore($),[K,be]=Mo(this);let ye="",Ne=!0;for(let we=0;we<c.length;we++){const Ae=c[we];if(rt(Ae)&&!Ae.isInline())Ne||(ye+=`
|
|
239
|
+
`),Ae.isEmpty()?Ne=!1:Ne=!0;else if(Ne=!1,St(Ae)){let Te=Ae.getTextContent();Ae===h?Ae===E?(S.type!=="element"||$.type!=="element"||$.offset===S.offset)&&(Te=K<be?Te.slice(K,be):Te.slice(be,K)):Te=G?Te.slice(K):Te.slice(be):Ae===E&&(Te=G?Te.slice(0,be):Te.slice(0,K)),ye+=Te}else(Wn(Ae)||$o(Ae))&&(Ae!==E||!this.isCollapsed())&&(ye+=Ae.getTextContent())}return ye}applyDOMRange(c){const h=$n(),E=h.getEditorState()._selection,S=xy(c.startContainer,c.startOffset,c.endContainer,c.endOffset,h,E);if(S===null)return;const[$,G]=S;Do(this.anchor,$.key,$.offset,$.type),Do(this.focus,G.key,G.offset,G.type),this._cachedNodes=null}clone(){const c=this.anchor,h=this.focus;return new or(nr(c.key,c.offset,c.type),nr(h.key,h.offset,h.type),this.format,this.style)}toggleFormat(c){this.format=Qn(this.format,c,null),this.dirty=!0}setStyle(c){this.style=c,this.dirty=!0}hasFormat(c){const h=Cr[c];return(this.format&h)!==0}insertRawText(c){const h=c.split(/(\r?\n|\t)/),E=[],S=h.length;for(let $=0;$<S;$++){const G=h[$];G===`
|
|
240
|
+
`||G===`\r
|
|
241
|
+
`?E.push(Nr()):G===" "?E.push(wa()):E.push(Kn(G))}this.insertNodes(E)}insertText(c){const h=this.anchor,E=this.focus,S=this.isCollapsed()||h.isBefore(E),$=this.format,G=this.style;S&&h.type==="element"?_d(h,E,$,G):!S&&E.type==="element"&&_d(E,h,$,G);const K=this.getNodes(),be=K.length,ye=S?h:E,Ne=S?E:h,we=ye.offset,Ae=Ne.offset;let Te=K[0];if(!St(Te))throw Error("insertText: first node is not a text node");const He=Te.getTextContent().length,Le=Te.getParentOrThrow(),Je=be-1;let ft=K[Je];if(this.isCollapsed()&&we===He&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextAfter()||!Le.canInsertTextAfter()&&Te.getNextSibling()===null)){let Ye=Te.getNextSibling();if((!St(Ye)||!Ye.canInsertTextBefore()||Ls(Ye))&&(Ye=Kn(),Ye.setFormat($),Le.canInsertTextAfter()?Te.insertAfter(Ye):Le.insertAfter(Ye)),Ye.select(0,0),Te=Ye,c!==""){this.insertText(c);return}}else if(this.isCollapsed()&&we===0&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextBefore()||!Le.canInsertTextBefore()&&Te.getPreviousSibling()===null)){let Ye=Te.getPreviousSibling();if((!St(Ye)||Ls(Ye))&&(Ye=Kn(),Ye.setFormat($),Le.canInsertTextBefore()?Te.insertBefore(Ye):Le.insertBefore(Ye)),Ye.select(),Te=Ye,c!==""){this.insertText(c);return}}else if(Te.isSegmented()&&we!==He){const Ye=Kn(Te.getTextContent());Ye.setFormat($),Te.replace(Ye),Te=Ye}else if(!this.isCollapsed()&&c!==""){const Ye=ft.getParent();if(!Le.canInsertTextBefore()||!Le.canInsertTextAfter()||rt(Ye)&&(!Ye.canInsertTextBefore()||!Ye.canInsertTextAfter())){this.insertText(""),_y(this.anchor,this.focus,null),this.insertText(c);return}}if(be===1){if(Te.isToken()){const Pt=Kn(c);Pt.select(),Te.replace(Pt);return}const Ye=Te.getFormat(),Ft=Te.getStyle();if(we===Ae&&(Ye!==$||Ft!==G))if(Te.getTextContent()==="")Te.setFormat($),Te.setStyle(G);else{const Pt=Kn(c);if(Pt.setFormat($),Pt.setStyle(G),Pt.select(),we===0)Te.insertBefore(Pt,!1);else{const[Zt]=Te.splitText(we);Zt.insertAfter(Pt,!1)}Pt.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);return}else if(ds(Te)){const Pt=Kn(c);Pt.setFormat($),Pt.setStyle(G),Pt.select(),Te.replace(Pt);return}const Ht=Ae-we;Te=Te.spliceText(we,Ht,c,!0),Te.getTextContent()===""?Te.remove():this.anchor.type==="text"&&(Te.isComposing()?this.anchor.offset-=c.length:(this.format=Ye,this.style=Ft))}else{const Ye=new Set([...Te.getParentKeys(),...ft.getParentKeys()]),Ft=rt(Te)?Te:Te.getParentOrThrow();let Ht=rt(ft)?ft:ft.getParentOrThrow(),Pt=ft;if(!Ft.is(Ht)&&Ht.isInline())do Pt=Ht,Ht=Ht.getParentOrThrow();while(Ht.isInline());if(Ne.type==="text"&&(Ae!==0||ft.getTextContent()==="")||Ne.type==="element"&&ft.getIndexWithinParent()<Ae)if(St(ft)&&!ft.isToken()&&Ae!==ft.getTextContentSize()){if(ft.isSegmented()){const Wt=Kn(ft.getTextContent());ft.replace(Wt),ft=Wt}!to(Ne.getNode())&&Ne.type==="text"&&(ft=ft.spliceText(0,Ae,"")),Ye.add(ft.__key)}else{const Wt=ft.getParentOrThrow();!Wt.canBeEmpty()&&Wt.getChildrenSize()===1?Wt.remove():ft.remove()}else Ye.add(ft.__key);const Zt=Ht.getChildren(),jt=new Set(K),Jt=Ft.is(Ht),un=Ft.isInline()&&Te.getNextSibling()===null?Ft:Te;for(let Wt=Zt.length-1;Wt>=0;Wt--){const zn=Zt[Wt];if(zn.is(Te)||rt(zn)&&zn.isParentOf(Te))break;zn.isAttached()&&(!jt.has(zn)||zn.is(Pt)?Jt||un.insertAfter(zn,!1):zn.remove())}if(!Jt){let Wt=Ht,zn=null;for(;Wt!==null;){const Po=Wt.getChildren(),Wi=Po.length;(Wi===0||Po[Wi-1].is(zn))&&(Ye.delete(Wt.__key),zn=Wt),Wt=Wt.getParent()}}if(!Te.isToken())Te=Te.spliceText(we,He-we,c,!0),Te.getTextContent()===""?Te.remove():Te.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);else if(we===He)Te.select();else{const Wt=Kn(c);Wt.select(),Te.replace(Wt)}for(let Wt=1;Wt<be;Wt++){const zn=K[Wt],Po=zn.__key;Ye.has(Po)||zn.remove()}}}removeText(){this.insertText("")}formatText(c){if(this.isCollapsed()){this.toggleFormat(c),Mn(null);return}const h=this.getNodes(),E=[];for(const Ye of h)St(Ye)&&E.push(Ye);const S=E.length;if(S===0){this.toggleFormat(c),Mn(null);return}const $=this.anchor,G=this.focus,K=this.isBackward(),be=K?G:$,ye=K?$:G;let Ne=0,we=E[0],Ae=be.type==="element"?0:be.offset;if(be.type==="text"&&Ae===we.getTextContentSize()&&(Ne=1,we=E[1],Ae=0),we==null)return;const Te=we.getFormatFlags(c,null),He=S-1;let Le=E[He];const Je=ye.type==="text"?ye.offset:Le.getTextContentSize();if(we.is(Le)){if(Ae===Je)return;if(Ae===0&&Je===we.getTextContentSize())we.setFormat(Te);else{const Ye=we.splitText(Ae,Je),Ft=Ae===0?Ye[0]:Ye[1];Ft.setFormat(Te),be.type==="text"&&be.set(Ft.__key,0,"text"),ye.type==="text"&&ye.set(Ft.__key,Je-Ae,"text")}this.format=Te;return}Ae!==0&&([,we]=we.splitText(Ae),Ae=0),we.setFormat(Te);const ft=Le.getFormatFlags(c,Te);Je>0&&(Je!==Le.getTextContentSize()&&([Le]=Le.splitText(Je)),Le.setFormat(ft));for(let Ye=Ne+1;Ye<He;Ye++){const Ft=E[Ye];if(!Ft.isToken()){const Ht=Ft.getFormatFlags(c,ft);Ft.setFormat(Ht)}}be.type==="text"&&be.set(we.__key,Ae,"text"),ye.type==="text"&&ye.set(Le.__key,Je,"text"),this.format=Te|ft}insertNodes(c){if(c.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const Le=xn();if(!Tt(Le))throw Error("Expected RangeSelection after insertParagraph");return Le.insertNodes(c)}const h=rs(this.anchor.getNode(),ha),E=c[c.length-1];if("__language"in h){if("__language"in c[0])this.insertText(c[0].getTextContent());else{const Le=wh(this);h.splice(Le,0,c),E.selectEnd()}return}const S=Le=>(rt(Le)||Wn(Le))&&!Le.isInline();if(!c.some(S)){const Le=wh(this);h.splice(Le,0,c),E.selectEnd();return}const $=y1(c),G=$.getLastDescendant(),K=$.getChildren(),be=Le=>"__value"in Le&&"__checked"in Le,ye=Le=>rt(Le)&&ha(Le)&&!Le.isEmpty()&&rt(h)&&(!h.isEmpty()||be(h)),Ne=!rt(h)||!h.isEmpty()?this.insertParagraph():null,we=K[K.length-1];let Ae=K[0];ye(Ae)&&(h.append(...Ae.getChildren()),Ae=K[1]),Ae&&Rn(h,Ae);const Te=rs(G,ha);Ne&&rt(Te)&&(be(Ne)||ha(we))&&(Te.append(...Ne.getChildren()),Ne.remove()),rt(h)&&h.isEmpty()&&h.remove(),G.selectEnd();const He=rt(h)?h.getLastChild():null;$o(He)&&Te!==h&&He.remove()}insertParagraph(){if(this.anchor.key==="root"){const G=Bi();return fr().splice(this.anchor.offset,0,[G]),G.select(),G}const c=wh(this),h=rs(this.anchor.getNode(),ha),E=h.getChildAtIndex(c),S=E?[E,...E.getNextSiblings()]:[],$=h.insertNewAfter(this,!1);return $?($.append(...S),$.selectStart(),$):null}insertLineBreak(c){const h=Nr();if(this.insertNodes([h]),c){const E=h.getParentOrThrow(),S=h.getIndexWithinParent();E.select(S,S)}}extract(){const c=this.getNodes(),h=c.length,E=h-1,S=this.anchor,$=this.focus;let G=c[0],K=c[E];const[be,ye]=Mo(this);if(h===0)return[];if(h===1){if(St(G)&&!this.isCollapsed()){const we=be>ye?ye:be,Ae=be>ye?be:ye,Te=G.splitText(we,Ae),He=we===0?Te[0]:Te[1];return He!=null?[He]:[]}return[G]}const Ne=S.isBefore($);if(St(G)){const we=Ne?be:ye;we===G.getTextContentSize()?c.shift():we!==0&&([,G]=G.splitText(we),c[0]=G)}if(St(K)){const we=K.getTextContent().length,Ae=Ne?ye:be;Ae===0?c.pop():Ae!==we&&([K]=K.splitText(Ae),c[E]=K)}return c}modify(c,h,E){const S=this.focus,$=this.anchor,G=c==="move",K=ua(S,h);if(Wn(K)&&!K.isIsolated()){if(G&&K.isKeyboardSelectable()){const Te=Eh();Te.add(K.__key),hr(Te);return}const Ae=h?K.getPreviousSibling():K.getNextSibling();if(St(Ae)){const Te=Ae.__key,He=h?Ae.getTextContent().length:0;S.set(Te,He,"text"),G&&$.set(Te,He,"text");return}else{const Te=K.getParentOrThrow();let He,Le;rt(Ae)?(Le=Ae.__key,He=h?Ae.getChildrenSize():0):(He=K.getIndexWithinParent(),Le=Te.__key,h||He++),S.set(Le,He,"element"),G&&$.set(Le,He,"element");return}}const be=$n(),ye=jr(be._window);if(!ye)return;const Ne=be._blockCursorElement,we=be._rootElement;if(we!==null&&Ne!==null&&rt(K)&&!K.isInline()&&!K.canBeEmpty()&&fa(Ne,be,we),ji(ye,c,h?"backward":"forward",E),ye.rangeCount>0){const Ae=ye.getRangeAt(0),Te=this.anchor.getNode(),He=to(Te)?Te:Lc(Te);if(this.applyDOMRange(Ae),this.dirty=!0,!G){const Le=this.getNodes(),Je=[];let ft=!1;for(let Ye=0;Ye<Le.length;Ye++){const Ft=Le[Ye];Fn(Ft,He)?Je.push(Ft):ft=!0}if(ft&&Je.length>0)if(h){const Ye=Je[0];rt(Ye)?Ye.selectStart():Ye.getParentOrThrow().selectStart()}else{const Ye=Je[Je.length-1];rt(Ye)?Ye.selectEnd():Ye.getParentOrThrow().selectEnd()}(ye.anchorNode!==Ae.startContainer||ye.anchorOffset!==Ae.startOffset)&&Lr(this)}}}deleteCharacter(c){const h=this.isCollapsed();if(this.isCollapsed()){const E=this.anchor,S=this.focus;let $=E.getNode();if(!c&&(E.type==="element"&&rt($)&&E.offset===$.getChildrenSize()||E.type==="text"&&E.offset===$.getTextContentSize())){const K=$.getParent(),be=$.getNextSibling()||(K===null?null:K.getNextSibling());if(rt(be)&&be.isShadowRoot())return}const G=ua(S,c);if(Wn(G)&&!G.isIsolated()){if(G.isKeyboardSelectable()&&rt($)&&$.getChildrenSize()===0){$.remove();const K=Eh();K.add(G.__key),hr(K)}else G.remove(),$n().dispatchCommand(t,void 0);return}else if(!c&&rt(G)&&rt($)&&$.isEmpty()){$.remove(),G.selectStart();return}if(this.modify("extend",c,"character"),this.isCollapsed()){if(c&&E.offset===0&&(E.type==="element"?E.getNode():E.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const K=S.type==="text"?S.getNode():null;if($=E.type==="text"?E.getNode():null,K!==null&&K.isSegmented()){const be=S.offset,ye=K.getTextContentSize();if(K.is($)||c&&be!==ye||!c&&be!==0){Qc(K,c,be);return}}else if($!==null&&$.isSegmented()){const be=E.offset,ye=$.getTextContentSize();if($.is(K)||c&&be!==0||!c&&be!==ye){Qc($,c,be);return}}al(this,c)}}if(this.removeText(),c&&!h&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const E=this.anchor.getNode();E.isEmpty()&&to(E.getParent())&&E.getIndexWithinParent()===0&&E.collapseAtStart(this)}}deleteLine(c){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",c,"lineboundary"),(c?this.focus:this.anchor).offset===0&&this.modify("extend",c,"character")),this.removeText()}deleteWord(c){this.isCollapsed()&&this.modify("extend",c,"word"),this.removeText()}}function gr(m){return m instanceof gn}function ko(m){const c=m.offset;if(m.type==="text")return c;const h=m.getNode();return c===h.getChildrenSize()?h.getTextContent().length:0}function Mo(m){const c=m.anchor,h=m.focus;return c.type==="element"&&h.type==="element"&&c.key===h.key&&c.offset===h.offset?[0,0]:[ko(c),ko(h)]}function Lr(m){const c=m.focus,h=m.anchor,E=h.key,S=h.offset,$=h.type;Do(h,c.key,c.offset,c.type),Do(c,E,S,$),m._cachedNodes=null}function ji(m,c,h,E){m.modify(c,h,E)}function al(m,c){const h=m.anchor,E=m.focus,S=h.getNode(),$=E.getNode();if(S===$&&h.type==="text"&&E.type==="text"){const G=h.offset,K=E.offset,be=G<K,ye=be?G:K,Ne=be?K:G,we=Ne-1;if(ye!==we){const Ae=S.getTextContent().slice(ye,Ne);Sc(Ae)||(c?E.offset=we:h.offset=we)}}}function Qc(m,c,h){const E=m,S=E.getTextContent().split(/(?=\s)/g),$=S.length;let G=0,K=0;for(let ye=0;ye<$;ye++){const Ne=S[ye],we=ye===$-1;if(K=G,G+=Ne.length,c&&G===h||G>h||we){S.splice(ye,1),we&&(K=void 0);break}}const be=S.join("").trim();be===""?E.remove():(E.setTextContent(be),E.select(K,K))}function l1(m,c,h){const E=m.getParent();return h===null||E===null||!E.canBeEmpty()||E!==h.getNode()}function vy(m,c,h,E){let S=c,$;if(m.nodeType===We){let G=!1;const K=m.childNodes,be=K.length;S===be&&(G=!0,S=be-1);let ye=K[S],Ne=!1;if(ye===E._blockCursorElement?(ye=K[S+1],Ne=!0):E._blockCursorElement!==null&&S--,$=Ni(ye),St($))S=Ua($,G);else{let we=Ni(m);if(we===null)return null;if(rt(we)){let Ae=we.getChildAtIndex(S);if(rt(Ae)&&l1(Ae,S,h)){const Te=G?Ae.getLastDescendant():Ae.getFirstDescendant();Te===null?(we=Ae,S=0):(Ae=Te,we=rt(Ae)?Ae:Ae.getParentOrThrow())}St(Ae)?($=Ae,we=null,S=Ua(Ae,G)):Ae!==we&&G&&!Ne&&S++}else{const Ae=we.getIndexWithinParent();c===0&&Wn(we)&&Ni(m)===we?S=Ae:S=Ae+1,we=we.getParentOrThrow()}if(rt(we))return nr(we.__key,S,"element")}}else $=Ni(m);return St($)?nr($.__key,S,"text"):null}function by(m,c,h){const E=m.offset,S=m.getNode();if(E===0){const $=S.getPreviousSibling(),G=S.getParent();if(!c)rt($)&&!h&&$.isInline()?(m.key=$.__key,m.offset=$.getChildrenSize(),m.type="element"):St($)&&(m.key=$.__key,m.offset=$.getTextContent().length);else if((h||!c)&&$===null&&rt(G)&&G.isInline()){const K=G.getPreviousSibling();St(K)&&(m.key=K.__key,m.offset=K.getTextContent().length)}}else if(E===S.getTextContent().length){const $=S.getNextSibling(),G=S.getParent();if(c&&rt($)&&$.isInline())m.key=$.__key,m.offset=0,m.type="element";else if((h||c)&&$===null&&rt(G)&&G.isInline()&&!G.canInsertTextAfter()){const K=G.getNextSibling();St(K)&&(m.key=K.__key,m.offset=0)}}}function _y(m,c,h){if(m.type==="text"&&c.type==="text"){const E=m.isBefore(c),S=m.is(c);by(m,E,S),by(c,!E,S),S&&(c.key=m.key,c.offset=m.offset,c.type=m.type);const $=$n();if($.isComposing()&&$._compositionKey!==m.key&&Tt(h)){const G=h.anchor,K=h.focus;Do(m,G.key,G.offset,G.type),Do(c,K.key,K.offset,K.type)}}}function xy(m,c,h,E,S,$){if(m===null||h===null||!Qo(S,m,h))return null;const G=vy(m,c,Tt($)?$.anchor:null,S);if(G===null)return null;const K=vy(h,E,Tt($)?$.focus:null,S);if(K===null)return null;if(G.type==="element"&&K.type==="element"){const be=Ni(m),ye=Ni(h);if(Wn(be)&&Wn(ye))return null}return _y(G,K,$),[G,K]}function c1(m){return rt(m)&&!m.isInline()}function Ey(m,c,h,E,S,$){const G=ui(),K=new or(nr(m,c,S),nr(h,E,$),0,"");return K.dirty=!0,G._selection=K,K}function u1(){const m=nr("root",0,"element"),c=nr("root",0,"element");return new or(m,c,0,"")}function Eh(){return new gn(new Set)}function d1(){const m=nr("root",0,"element"),c=nr("root",0,"element");return new ci("root",m,c)}function f1(m){const c=m.getEditorState()._selection,h=jr(m._window);return Tt(c)||c==null?Ch(c,h,m):c.clone()}function Ch(m,c,h){const E=h._window;if(E===null)return null;const S=E.event,$=S?S.type:void 0,G=$==="selectionchange",K=!at()&&(G||$==="beforeinput"||$==="compositionstart"||$==="compositionend"||$==="click"&&S&&S.detail===3||$==="drop"||$===void 0);let be,ye,Ne,we;if(!Tt(m)||K){if(c===null)return null;if(be=c.anchorNode,ye=c.focusNode,Ne=c.anchorOffset,we=c.focusOffset,G&&Tt(m)&&!Qo(h,be,ye))return m.clone()}else return m.clone();const Ae=xy(be,Ne,ye,we,h,m);if(Ae===null)return null;const[Te,He]=Ae;return new or(Te,He,Tt(m)?m.format:0,Tt(m)?m.style:"")}function xn(){return ui()._selection}function sl(){return $n()._editorState._selection}function xd(m,c,h,E=1){const S=m.anchor,$=m.focus,G=S.getNode(),K=$.getNode();if(!c.is(G)&&!c.is(K))return;const be=c.__key;if(m.isCollapsed()){const ye=S.offset;if(h<=ye&&E>0||h<ye&&E<0){const Ne=Math.max(0,ye+E);S.set(be,Ne,"element"),$.set(be,Ne,"element"),Cy(m)}}else{const ye=m.isBackward(),Ne=ye?$:S,we=Ne.getNode(),Ae=ye?S:$,Te=Ae.getNode();if(c.is(we)){const He=Ne.offset;(h<=He&&E>0||h<He&&E<0)&&Ne.set(be,Math.max(0,He+E),"element")}if(c.is(Te)){const He=Ae.offset;(h<=He&&E>0||h<He&&E<0)&&Ae.set(be,Math.max(0,He+E),"element")}}Cy(m)}function Cy(m){const c=m.anchor,h=c.offset,E=m.focus,S=E.offset,$=c.getNode(),G=E.getNode();if(m.isCollapsed()){if(!rt($))return;const K=$.getChildrenSize(),be=h>=K,ye=be?$.getChildAtIndex(K-1):$.getChildAtIndex(h);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),c.set(ye.__key,Ne,"text"),E.set(ye.__key,Ne,"text")}return}if(rt($)){const K=$.getChildrenSize(),be=h>=K,ye=be?$.getChildAtIndex(K-1):$.getChildAtIndex(h);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),c.set(ye.__key,Ne,"text")}}if(rt(G)){const K=G.getChildrenSize(),be=S>=K,ye=be?G.getChildAtIndex(K-1):G.getChildAtIndex(S);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),E.set(ye.__key,Ne,"text")}}}function h1(m,c){const h=c.getEditorState()._selection,E=m._selection;if(Tt(E)){const S=E.anchor,$=E.focus;let G;if(S.type==="text"&&(G=S.getNode(),G.selectionTransform(h,E)),$.type==="text"){const K=$.getNode();G!==K&&K.selectionTransform(h,E)}}}function Ed(m,c,h,E,S){let $=null,G=0,K=null;E!==null?($=E.__key,St(E)?(G=E.getTextContentSize(),K="text"):rt(E)&&(G=E.getChildrenSize(),K="element")):S!==null&&($=S.__key,St(S)?K="text":rt(S)&&(K="element")),$!==null&&K!==null?m.set($,G,K):(G=c.getIndexWithinParent(),G===-1&&(G=h.getChildrenSize()),m.set(h.__key,G,"element"))}function wy(m,c,h,E,S){m.type==="text"?(m.key=h,c||(m.offset+=S)):m.offset>E.getIndexWithinParent()&&(m.offset-=1)}function p1(m,c,h,E,S,$,G){const K=E.anchorNode,be=E.focusNode,ye=E.anchorOffset,Ne=E.focusOffset,we=document.activeElement;if(S.has("collaboration")&&we!==$||we!==null&&Cc(we))return;if(!Tt(c)){m!==null&&Qo(h,K,be)&&E.removeAllRanges();return}const Ae=c.anchor,Te=c.focus,He=Ae.key,Le=Te.key,Je=ts(h,He),ft=ts(h,Le),Ye=Ae.offset,Ft=Te.offset,Ht=c.format,Pt=c.style,Zt=c.isCollapsed();let jt=Je,Jt=ft,un=!1;if(Ae.type==="text"){jt=An(Je);const Wt=Ae.getNode();un=Wt.getFormat()!==Ht||Wt.getStyle()!==Pt}else Tt(m)&&m.anchor.type==="text"&&(un=!0);if(Te.type==="text"&&(Jt=An(ft)),!(jt===null||Jt===null)&&(Zt&&(m===null||un||Tt(m)&&(m.format!==Ht||m.style!==Pt))&&it(Ht,Pt,Ye,He,performance.now()),!(ye===Ye&&Ne===Ft&&K===jt&&be===Jt&&!(E.type==="Range"&&Zt)&&((we===null||!$.contains(we))&&$.focus({preventScroll:!0}),Ae.type!=="element")))){try{E.setBaseAndExtent(jt,Ye,Jt,Ft)}catch{}if(!S.has("skip-scroll-into-view")&&c.isCollapsed()&&$!==null&&$===document.activeElement){const Wt=c instanceof or&&c.anchor.type==="element"?jt.childNodes[Ye]||null:E.rangeCount>0?E.getRangeAt(0):null;if(Wt!==null){let zn;if(Wt instanceof Text){const Po=document.createRange();Po.selectNode(Wt),zn=Po.getBoundingClientRect()}else zn=Wt.getBoundingClientRect();vh(h,zn,$)}}Ie()}}function g1(m){let c=xn()||sl();c===null&&(c=fr().selectEnd()),c.insertNodes(m)}function m1(){const m=xn();return m===null?"":m.getTextContent()}function Ty(m,c,h){const E=[];let S=null,$=null;function G(ye,Ne,we){const Ae={cell:we,startColumn:Ne,startRow:ye},Te=we.__rowSpan,He=we.__colSpan;for(let Le=0;Le<Te;Le++){E[ye+Le]===void 0&&(E[ye+Le]=[]);for(let Je=0;Je<He;Je++)E[ye+Le][Ne+Je]=Ae}c.is(we)&&(S=Ae),h.is(we)&&($=Ae)}function K(ye,Ne){return E[ye]===void 0||E[ye][Ne]===void 0}const be=m.getChildren();for(let ye=0;ye<be.length;ye++){const Ne=be[ye];if(!tu(Ne))throw Error("Expected GridNode children to be GridRowNode");const we=Ne.getChildren();let Ae=0;for(const Te of we){if(!vo(Te))throw Error("Expected GridRowNode children to be GridCellNode");for(;!K(ye,Ae);)Ae++;G(ye,Ae,Te),Ae+=Te.__colSpan}}if(S===null)throw Error("Anchor not found in Grid");if($===null)throw Error("Focus not found in Grid");return[E,S,$]}function Ny(m){let c;if(m instanceof Ah)c=m;else if(m instanceof $t){const S=Di(m,vo);if(!vo(S))throw Error("Expected to find a parent GridCellNode");c=S}else{const S=Di(m.getNode(),vo);if(!vo(S))throw Error("Expected to find a parent GridCellNode");c=S}const h=c.getParent();if(!tu(h))throw Error("Expected GridCellNode to have a parent GridRowNode");const E=h.getParent();if(!Rh(E))throw Error("Expected GridRowNode to have a parent GridNode");return[c,h,E]}function wh(m){m.isCollapsed()||m.removeText();const c=m.anchor,h=c.getNode();if(!St(h))return c.offset;const E=h.getParent();if(!E){const be=Bi();return fr().append(be),be.select(),0}const S=h.splitText(c.offset);if(S.length===0)return 0;const $=c.offset===0?0:1,G=S[0].getIndexWithinParent()+$;if(!E.isInline()||G===0)return G;const K=E.getChildAtIndex(G);return K&&E.insertNewAfter(m).append(K,...K.getNextSiblings()),E.getIndexWithinParent()+$}function y1(m){const c=Bi();let h=null;for(let E=0;E<m.length;E++){const S=m[E],$=$o(S);if($||Wn(S)&&S.isInline()||rt(S)&&S.isInline()||St(S)||S.isParentRequired()){if(h===null&&(h=S.createParentElementNode(),c.append(h),$))continue;h!==null&&h.append(S)}else c.append(S),h=null}return c}let mr=null,yr=null,zr=!1,Th=!1,Cd=0;const Sy={characterData:!0,childList:!0,subtree:!0};function ll(){return zr||mr!==null&&mr._readOnly}function Sr(){if(zr)throw Error("Cannot use method in read-only mode.")}function Oy(){if(Cd>99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function ui(){if(mr===null)throw Error("Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().");return mr}function $n(){if(yr===null)throw Error("Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().");return yr}function v1(){return yr}function Ay(m,c,h){const E=c.__type,S=Ec(m,E);let $=h.get(E);$===void 0&&($=Array.from(S.transforms),h.set(E,$));const G=$.length;for(let K=0;K<G&&($[K](c),!!c.isAttached());K++);}function Ry(m,c){return m!==void 0&&m.__key!==c&&m.isAttached()}function b1(m,c){const h=c._dirtyLeaves,E=m._nodeMap;for(const S of h){const $=E.get(S);St($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&Mr($)}}function _1(m,c){const h=c._dirtyLeaves,E=c._dirtyElements,S=m._nodeMap,$=qr(),G=new Map;let K=h,be=K.size,ye=E,Ne=ye.size;for(;be>0||Ne>0;){if(be>0){c._dirtyLeaves=new Set;for(const we of K){const Ae=S.get(we);St(Ae)&&Ae.isAttached()&&Ae.isSimpleText()&&!Ae.isUnmergeable()&&Mr(Ae),Ae!==void 0&&Ry(Ae,$)&&Ay(c,Ae,G),h.add(we)}if(K=c._dirtyLeaves,be=K.size,be>0){Cd++;continue}}c._dirtyLeaves=new Set,c._dirtyElements=new Map;for(const we of ye){const Ae=we[0],Te=we[1];if(Ae!=="root"&&!Te)continue;const He=S.get(Ae);He!==void 0&&Ry(He,$)&&Ay(c,He,G),E.set(Ae,Te)}K=c._dirtyLeaves,be=K.size,ye=c._dirtyElements,Ne=ye.size,Cd++}c._dirtyLeaves=h,c._dirtyElements=E}function x1(m){return Nh(m,$n()._nodes)}function Nh(m,c){const h=m.type,E=c.get(h);if(E===void 0)throw Error(`parseEditorState: type "${h}" + not found`);const S=E.klass;if(m.type!==S.getType())throw Error(`LexicalNode: Node ${S.name} does not implement .importJSON().`);const $=S.importJSON(m),G=m.children;if(rt($)&&Array.isArray(G))for(let K=0;K<G.length;K++){const be=G[K],ye=Nh(be,c);$.append(ye)}return $}function E1(m,c,h){const E=Oh(),S=mr,$=zr,G=yr,K=c._dirtyElements,be=c._dirtyLeaves,ye=c._cloneNotNeeded,Ne=c._dirtyType;c._dirtyElements=new Map,c._dirtyLeaves=new Set,c._cloneNotNeeded=new Set,c._dirtyType=0,mr=E,zr=!1,yr=c;try{const we=c._nodes,Ae=m.root;Nh(Ae,we),h&&h(),E._readOnly=!0,Dy(E)}catch(we){we instanceof Error&&c._onError(we)}finally{c._dirtyElements=K,c._dirtyLeaves=be,c._cloneNotNeeded=ye,c._dirtyType=Ne,mr=S,zr=$,yr=G}return E}function $y(m,c){const h=mr,E=zr,S=yr;mr=m,zr=!0,yr=null;try{return c()}finally{mr=h,zr=E,yr=S}}function Dy(m){const c=m._nodeMap;c.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},c.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},c.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function fs(m,c){const h=m._pendingEditorState,E=m._rootElement,S=m._headless||E===null;if(h===null)return;const $=m._editorState,G=$._selection,K=h._selection,be=m._dirtyType!==st,ye=mr,Ne=zr,we=yr,Ae=m._updating,Te=m._observer;let He=null;if(m._pendingEditorState=null,m._editorState=h,!S&&be&&Te!==null){yr=m,mr=h,zr=!1,m._updating=!0;try{const Zt=m._dirtyType,jt=m._dirtyElements,Jt=m._dirtyLeaves;Te.disconnect(),He=hd($,h,m,Zt,jt,Jt)}catch(Zt){if(Zt instanceof Error&&m._onError(Zt),!Th)Fy(m,null,E,h),_r(m),m._dirtyType=Ct,Th=!0,fs(m,$),Th=!1;else throw Zt;return}finally{Te.observe(E,Sy),m._updating=Ae,mr=ye,zr=Ne,yr=we}}h._readOnly||(h._readOnly=!0,Dy(h),Tt(K)&&(Object.freeze(K.anchor),Object.freeze(K.focus)),Object.freeze(K));const Le=m._dirtyLeaves,Je=m._dirtyElements,ft=m._normalizedNodes,Ye=m._updateTags,Ft=m._deferred;be&&(m._dirtyType=st,m._cloneNotNeeded.clear(),m._dirtyLeaves=new Set,m._dirtyElements=new Map,m._normalizedNodes=new Set,m._updateTags=new Set),ud(m,h);const Ht=S?null:jr(m._window);if(m._editable&&Ht!==null&&(be||K===null||K.dirty)){yr=m,mr=h;try{if(Te!==null&&Te.disconnect(),be||K===null||K.dirty){const Zt=m._blockCursorElement;Zt!==null&&fa(Zt,m,E),p1(G,K,m,Ht,Ye,E)}Lt(m,E,K),Te!==null&&Te.observe(E,Sy)}finally{yr=we,mr=ye}}He!==null&&w1(m,He,Ye,Le,$),!Tt(K)&&K!==null&&(G===null||!G.is(K))&&m.dispatchCommand(t,void 0);const Pt=m._pendingDecorators;Pt!==null&&(m._decorators=Pt,m._pendingDecorators=null,eu("decorator",m,!0,Pt)),C1(m,c||$,h),eu("update",m,!0,{dirtyElements:Je,dirtyLeaves:Le,editorState:h,normalizedNodes:ft,prevEditorState:c||$,tags:Ye}),N1(m,Ft),T1(m)}function C1(m,c,h){const E=js(c),S=js(h);E!==S&&eu("textcontent",m,!0,S)}function w1(m,c,h,E,S){const $=Array.from(m._listeners.mutation),G=$.length;for(let K=0;K<G;K++){const[be,ye]=$[K],Ne=c.get(ye);Ne!==void 0&&be(Ne,{dirtyLeaves:E,prevEditorState:S,updateTags:h})}}function eu(m,c,h,...E){const S=c._updating;c._updating=h;try{const $=Array.from(c._listeners[m]);for(let G=0;G<$.length;G++)$[G].apply(null,E)}finally{c._updating=S}}function ky(m,c,h){if(m._updating===!1||yr!==m){let S=!1;return m.update(()=>{S=ky(m,c,h)}),S}const E=Ws(m);for(let S=4;S>=0;S--)for(let $=0;$<E.length;$++){const G=E[$]._commands.get(c);if(G!==void 0){const K=G[S];if(K!==void 0){const be=Array.from(K),ye=be.length;for(let Ne=0;Ne<ye;Ne++)if(be[Ne](h,m)===!0)return!0}}}return!1}function T1(m){const c=m._updates;if(c.length!==0){const h=c.shift();if(h){const[E,S]=h;Py(m,E,S)}}}function N1(m,c){if(m._deferred=[],c.length!==0){const h=m._updating;m._updating=!0;try{for(let E=0;E<c.length;E++)c[E]()}finally{m._updating=h}}}function My(m,c){const h=m._updates;let E=c||!1;for(;h.length!==0;){const S=h.shift();if(S){const[$,G]=S;let K,be;G!==void 0&&(K=G.onUpdate,be=G.tag,G.skipTransforms&&(E=!0),K&&m._deferred.push(K),be&&m._updateTags.add(be)),$()}}return E}function Py(m,c,h){const E=m._updateTags;let S,$,G=!1,K=!1;h!==void 0&&(S=h.onUpdate,$=h.tag,$!=null&&E.add($),G=h.skipTransforms||!1,K=h.discrete||!1),S&&m._deferred.push(S);const be=m._editorState;let ye=m._pendingEditorState,Ne=!1;(ye===null||ye._readOnly)&&(ye=m._pendingEditorState=A1(ye||be),Ne=!0),ye._flushSync=K;const we=mr,Ae=zr,Te=yr,He=m._updating;mr=ye,zr=!1,m._updating=!0,yr=m;try{Ne&&(m._headless?be._selection!=null&&(ye._selection=be._selection.clone()):ye._selection=f1(m));const Le=m._compositionKey;c(),G=My(m,G),h1(ye,m),m._dirtyType!==st&&(G?b1(ye,m):_1(ye,m),My(m),dd(be,ye,m._dirtyLeaves,m._dirtyElements));const Je=m._compositionKey;Le!==Je&&(ye._flushSync=!0);const ft=ye._selection;if(Tt(ft)){const Ye=ye._nodeMap,Ft=ft.anchor.key,Ht=ft.focus.key;if(Ye.get(Ft)===void 0||Ye.get(Ht)===void 0)throw Error("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else gr(ft)&&ft._nodes.size===0&&(ye._selection=null)}catch(Le){Le instanceof Error&&m._onError(Le),m._pendingEditorState=be,m._dirtyType=Ct,m._cloneNotNeeded.clear(),m._dirtyLeaves=new Set,m._dirtyElements.clear(),fs(m);return}finally{mr=we,zr=Ae,yr=Te,m._updating=He,Cd=0}m._dirtyType!==st||O1(ye,m)?ye._flushSync?(ye._flushSync=!1,fs(m)):Ne&&ho(()=>{fs(m)}):(ye._flushSync=!1,Ne&&(E.clear(),m._deferred=[],m._pendingEditorState=null))}function eo(m,c,h){m._updating?m._updates.push([c,h]):Py(m,c,h)}class Sh extends $t{constructor(c){super(c)}decorate(c,h){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Wn(m){return m instanceof Sh}class hs extends $t{constructor(c){super(c),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const c=this.getFormat();return fo[c]||""}getIndent(){return this.getLatest().__indent}getChildren(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getChildrenKeys(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h.__key),h=h.getNextSibling();return c}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const c=$n()._dirtyElements;return c!==null&&c.has(this.__key)}isLastChild(){const c=this.getLatest(),h=this.getParentOrThrow().getLastChild();return h!==null&&h.is(c)}getAllTextNodes(){const c=[];let h=this.getFirstChild();for(;h!==null;){if(St(h)&&c.push(h),rt(h)){const E=h.getAllTextNodes();c.push(...E)}h=h.getNextSibling()}return c}getFirstDescendant(){let c=this.getFirstChild();for(;c!==null;){if(rt(c)){const h=c.getFirstChild();if(h!==null){c=h;continue}}break}return c}getLastDescendant(){let c=this.getLastChild();for(;c!==null;){if(rt(c)){const h=c.getLastChild();if(h!==null){c=h;continue}}break}return c}getDescendantByIndex(c){const h=this.getChildren(),E=h.length;if(c>=E){const $=h[E-1];return rt($)&&$.getLastDescendant()||$||null}const S=h[c];return rt(S)&&S.getFirstDescendant()||S||null}getFirstChild(){const c=this.getLatest().__first;return c===null?null:Ln(c)}getFirstChildOrThrow(){const c=this.getFirstChild();if(c===null)throw Error(`Expected node ${this.__key} to have a first child.`);return c}getLastChild(){const c=this.getLatest().__last;return c===null?null:Ln(c)}getLastChildOrThrow(){const c=this.getLastChild();if(c===null)throw Error(`Expected node ${this.__key} to have a last child.`);return c}getChildAtIndex(c){const h=this.getChildrenSize();let E,S;if(c<h/2){for(E=this.getFirstChild(),S=0;E!==null&&S<=c;){if(S===c)return E;E=E.getNextSibling(),S++}return null}for(E=this.getLastChild(),S=h-1;E!==null&&S>=c;){if(S===c)return E;E=E.getPreviousSibling(),S--}return null}getTextContent(){let c="";const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContent(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Kt)}return c}getTextContentSize(){let c=0;const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContentSize(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Kt.length)}return c}getDirection(){return this.getLatest().__dir}hasFormat(c){if(c!==""){const h=br[c];return(this.getFormat()&h)!==0}return!1}select(c,h){Sr();const E=xn();let S=c,$=h;const G=this.getChildrenSize();if(!this.canBeEmpty()){if(c===0&&h===0){const be=this.getFirstChild();if(St(be)||rt(be))return be.select(0,0)}else if((c===void 0||c===G)&&(h===void 0||h===G)){const be=this.getLastChild();if(St(be)||rt(be))return be.select()}}S===void 0&&(S=G),$===void 0&&($=G);const K=this.__key;if(Tt(E))E.anchor.set(K,S,"element"),E.focus.set(K,$,"element"),E.dirty=!0;else return Ey(K,S,K,$,"element","element");return E}selectStart(){const c=this.getFirstDescendant();return c?c.selectStart():this.select()}selectEnd(){const c=this.getLastDescendant();return c?c.selectEnd():this.select()}clear(){const c=this.getWritable();return this.getChildren().forEach(h=>h.remove()),c}append(...c){return this.splice(this.getChildrenSize(),0,c)}setDirection(c){const h=this.getWritable();return h.__dir=c,h}setFormat(c){const h=this.getWritable();return h.__format=c!==""?br[c]:0,this}setIndent(c){const h=this.getWritable();return h.__indent=c,this}splice(c,h,E){const S=E.length,$=this.getChildrenSize(),G=this.getWritable(),K=G.__key,be=[],ye=[],Ne=this.getChildAtIndex(c+h);let we=null,Ae=$-h+S;if(c!==0)if(c===$)we=this.getLastChild();else{const He=this.getChildAtIndex(c);He!==null&&(we=He.getPreviousSibling())}if(h>0){let He=we===null?this.getFirstChild():we.getNextSibling();for(let Le=0;Le<h;Le++){if(He===null)throw Error("splice: sibling not found");const Je=He.getNextSibling(),ft=He.__key,Ye=He.getWritable();Yr(Ye),ye.push(ft),He=Je}}let Te=we;for(let He=0;He<S;He++){const Le=E[He];Te!==null&&Le.is(Te)&&(we=Te=Te.getPreviousSibling());const Je=Le.getWritable();Je.__parent===K&&Ae--,Yr(Je);const ft=Le.__key;if(Te===null)G.__first=ft,Je.__prev=null;else{const Ye=Te.getWritable();Ye.__next=ft,Je.__prev=Ye.__key}if(Le.__key===K)throw Error("append: attempting to append self");Je.__parent=K,be.push(ft),Te=Le}if(c+h===$){if(Te!==null){const He=Te.getWritable();He.__next=null,G.__last=Te.__key}}else if(Ne!==null){const He=Ne.getWritable();if(Te!==null){const Le=Te.getWritable();He.__prev=Te.__key,Le.__next=Ne.__key}else He.__prev=null}if(G.__size=Ae,ye.length){const He=xn();if(Tt(He)){const Le=new Set(ye),Je=new Set(be),{anchor:ft,focus:Ye}=He;Iy(ft,Le,Je)&&Ed(ft,ft.getNode(),this,we,Ne),Iy(Ye,Le,Je)&&Ed(Ye,Ye.getNode(),this,we,Ne),Ae===0&&!this.canBeEmpty()&&!er(this)&&this.remove()}}return G}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(c,h){return null}canIndent(){return!0}collapseAtStart(c){return!1}excludeFromCopy(c){return!1}canExtractContents(){return!0}canReplaceWith(c){return!0}canInsertAfter(c){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(c){return!1}extractWithChild(c,h,E){return!1}}function rt(m){return m instanceof hs}function Iy(m,c,h){let E=m.getNode();for(;E;){const S=E.__key;if(c.has(S)&&!h.has(S))return!0;E=E.getParent()}return!1}class cl extends hs{static getType(){return"root"}static clone(){return new cl}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){throw Error("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const c=this.__cachedText;return(ll()||$n()._dirtyType===st)&&c!==null?c:super.getTextContent()}remove(){throw Error("remove: cannot be called on root nodes")}replace(c){throw Error("replace: cannot be called on root nodes")}insertBefore(c){throw Error("insertBefore: cannot be called on root nodes")}insertAfter(c){throw Error("insertAfter: cannot be called on root nodes")}updateDOM(c,h){return!1}append(...c){for(let h=0;h<c.length;h++){const E=c[h];if(!rt(E)&&!Wn(E))throw Error("rootNode.append: Only element or decorator nodes can be appended to the root node")}return super.append(...c)}static importJSON(c){const h=fr();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function S1(){return new cl}function to(m){return m instanceof cl}function O1(m,c){const h=c.getEditorState()._selection,E=m._selection;if(E!==null){if(E.dirty||!E.is(h))return!0}else if(h!==null)return!0;return!1}function A1(m){return new wd(new Map(m._nodeMap))}function Oh(){return new wd(new Map([["root",S1()]]))}function Ly(m){const c=m.exportJSON(),h=m.constructor;if(c.type!==h.getType())throw Error(`LexicalNode: Node ${h.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`);const E=c.children;if(rt(m)){if(!Array.isArray(E))throw Error(`LexicalNode: Node ${h.name} is an element but .exportJSON() does not have a children array.`);const S=m.getChildren();for(let $=0;$<S.length;$++){const G=S[$],K=Ly(G);E.push(K)}}return c}class wd{constructor(c,h){this._nodeMap=c,this._selection=h||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(c){return $y(this,c)}clone(c){const h=new wd(this._nodeMap,c===void 0?this._selection:c);return h._readOnly=!0,h}toJSON(){return $y(this,()=>({root:Ly(fr())}))}}class ul extends hs{static getType(){return"paragraph"}static clone(c){return new ul(c.__key)}createDOM(c){const h=document.createElement("p"),E=$i(c.theme,"paragraph");return E!==void 0&&h.classList.add(...E),h}updateDOM(c,h,E){return!1}static importDOM(){return{p:c=>({conversion:R1,priority:0})}}exportDOM(c){const{element:h}=super.exportDOM(c);if(h&&ri(h)){this.isEmpty()&&h.append(document.createElement("br"));const E=this.getFormatType();h.style.textAlign=E;const S=this.getDirection();S&&(h.dir=S);const $=this.getIndent();$>0&&(h.style.textIndent=`${$*20}px`)}return{element:h}}static importJSON(c){const h=Bi();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(c,h){const E=Bi(),S=this.getDirection();return E.setDirection(S),this.insertAfter(E,h),E}collapseAtStart(){const c=this.getChildren();if(c.length===0||St(c[0])&&c[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function R1(m){const c=Bi();if(m.style){c.setFormat(m.style.textAlign);const h=parseInt(m.style.textIndent,10)/20;h>0&&c.setIndent(h)}return{node:c}}function Bi(){return da(new ul)}function $1(m){return m instanceof ul}const D1=0,k1=1,M1=2,P1=3,I1=4;function Fy(m,c,h,E){const S=m._keyToDOMMap;S.clear(),m._editorState=Oh(),m._pendingEditorState=E,m._compositionKey=null,m._dirtyType=st,m._cloneNotNeeded.clear(),m._dirtyLeaves=new Set,m._dirtyElements.clear(),m._normalizedNodes=new Set,m._updateTags=new Set,m._updates=[],m._blockCursorElement=null;const $=m._observer;$!==null&&($.disconnect(),m._observer=null),c!==null&&(c.textContent=""),h!==null&&(h.textContent="",S.set("root",h))}function L1(m,c){const h=new Map,E=new Set,S=$=>{Object.keys($).forEach(G=>{let K=h.get(G);K===void 0&&(K=[],h.set(G,K)),K.push($[G])})};return m.forEach($=>{const G=$.klass.importDOM!=null?$.klass.importDOM.bind($.klass):null;if(G==null||E.has(G))return;E.add(G);const K=G();K!==null&&S(K)}),c&&S(c),h}function F1(m){const c=m||{},h=v1(),E=c.theme||{},S=m===void 0?h:c.parentEditor||null,$=c.disableEvents||!1,G=Oh(),K=c.namespace||(S!==null?S._config.namespace:Oc()),be=c.editorState,ye=[cl,si,Jn,li,ul,...c.nodes||[]],{onError:Ne,html:we}=c,Ae=c.editable!==void 0?c.editable:!0;let Te;if(m===void 0&&h!==null)Te=h._nodes;else{Te=new Map;for(let Le=0;Le<ye.length;Le++){let Je=ye[Le],ft=null,Ye=null;if(typeof Je!="function"){const Zt=Je;Je=Zt.replace,ft=Zt.with,Ye=Zt.withKlass||null}{const Zt=Je.name;if(Zt!=="RootNode"){const jt=Je.prototype;["getType","clone"].forEach(Jt=>{Je.hasOwnProperty(Jt)||console.warn(`${Zt} must implement static "${Jt}" method`)}),!Je.hasOwnProperty("importDOM")&&Je.hasOwnProperty("exportDOM")&&console.warn(`${Zt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),jt instanceof Sh&&(jt.hasOwnProperty("decorate")||console.warn(`${jt.constructor.name} must implement "decorate" method`)),Je.hasOwnProperty("importJSON")||console.warn(`${Zt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),jt.hasOwnProperty("exportJSON")||console.warn(`${Zt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const Ft=Je.getType(),Ht=Je.transform(),Pt=new Set;Ht!==null&&Pt.add(Ht),Te.set(Ft,{exportDOM:we&&we.export?we.export.get(Je):void 0,klass:Je,replace:ft,replaceWithKlass:Ye,transforms:Pt})}}const He=new j1(G,S,Te,{disableEvents:$,namespace:K,theme:E},Ne||console.error,L1(Te,we?we.import:void 0),Ae);return be!==void 0&&(He._pendingEditorState=be,He._dirtyType=Ct),He}class j1{constructor(c,h,E,S,$,G,K){this._parentEditor=h,this._rootElement=null,this._editorState=c,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=S,this._nodes=E,this._decorators={},this._pendingDecorators=null,this._dirtyType=st,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Oc(),this._onError=$,this._htmlConversions=G,this._editable=K,this._headless=h!==null&&h._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(c){const h=this._listeners.update;return h.add(c),()=>{h.delete(c)}}registerEditableListener(c){const h=this._listeners.editable;return h.add(c),()=>{h.delete(c)}}registerDecoratorListener(c){const h=this._listeners.decorator;return h.add(c),()=>{h.delete(c)}}registerTextContentListener(c){const h=this._listeners.textcontent;return h.add(c),()=>{h.delete(c)}}registerRootListener(c){const h=this._listeners.root;return c(this._rootElement,null),h.add(c),()=>{c(null,this._rootElement),h.delete(c)}}registerCommand(c,h,E){if(E===void 0)throw Error('Listener for type "command" requires a "priority".');const S=this._commands;S.has(c)||S.set(c,[new Set,new Set,new Set,new Set,new Set]);const $=S.get(c);if($===void 0)throw Error(`registerCommand: Command ${String(c)} not found in command map`);const G=$[E];return G.add(h),()=>{G.delete(h),$.every(K=>K.size===0)&&S.delete(c)}}registerMutationListener(c,h){if(this._nodes.get(c.getType())===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);const E=this._listeners.mutation;return E.set(h,c),()=>{E.delete(h)}}registerNodeTransformToKlass(c,h){const E=c.getType(),S=this._nodes.get(E);if(S===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);return S.transforms.add(h),S}registerNodeTransform(c,h){const E=this.registerNodeTransformToKlass(c,h),S=[E],$=E.replaceWithKlass;if($!=null){const G=this.registerNodeTransformToKlass($,h);S.push(G)}return Ka(this,c.getType()),()=>{S.forEach(G=>G.transforms.delete(h))}}hasNode(c){return this._nodes.has(c.getType())}hasNodes(c){return c.every(this.hasNode.bind(this))}dispatchCommand(c,h){return mt(this,c,h)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(c){const h=this._rootElement;if(c!==h){const E=$i(this._config.theme,"root"),S=this._pendingEditorState||this._editorState;if(this._rootElement=c,Fy(this,h,c,S),h!==null&&(this._config.disableEvents||Ze(h),E!=null&&h.classList.remove(...E)),c!==null){const $=Nt(c),G=c.style;G.userSelect="text",G.whiteSpace="pre-wrap",G.wordBreak="break-word",c.setAttribute("data-lexical-editor","true"),this._window=$,this._dirtyType=Ct,_r(this),this._updateTags.add("history-merge"),fs(this),this._config.disableEvents||Ve(c,this),E!=null&&c.classList.add(...E)}else this._editorState=S,this._pendingEditorState=null,this._window=null;eu("root",this,!1,c,h)}}getElementByKey(c){return this._keyToDOMMap.get(c)||null}getEditorState(){return this._editorState}setEditorState(c,h){if(c.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");yn(this);const E=this._pendingEditorState,S=this._updateTags,$=h!==void 0?h.tag:null;E!==null&&!E.isEmpty()&&($!=null&&S.add($),fs(this)),this._pendingEditorState=c,this._dirtyType=Ct,this._dirtyElements.set("root",!1),this._compositionKey=null,$!=null&&S.add($),fs(this)}parseEditorState(c,h){const E=typeof c=="string"?JSON.parse(c):c;return E1(E,this,h)}update(c,h){eo(this,c,h)}focus(c,h={}){const E=this._rootElement;E!==null&&(E.setAttribute("autocapitalize","off"),eo(this,()=>{const S=xn(),$=fr();S!==null?S.dirty=!0:$.getChildrenSize()!==0&&(h.defaultSelection==="rootStart"?$.selectStart():$.selectEnd())},{onUpdate:()=>{E.removeAttribute("autocapitalize"),c&&c()},tag:"focus"}),this._pendingEditorState===null&&E.removeAttribute("autocapitalize"))}blur(){const c=this._rootElement;c!==null&&c.blur();const h=jr(this._window);h!==null&&h.removeAllRanges()}isEditable(){return this._editable}setEditable(c){this._editable!==c&&(this._editable=c,eu("editable",this,!0,c))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Ah extends hs{constructor(c,h){super(h),this.__colSpan=c,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(c){return this.getWritable().__colSpan=c,this}getRowSpan(){return this.__rowSpan}setRowSpan(c){return this.getWritable().__rowSpan=c,this}}function vo(m){return m instanceof Ah}class jy extends hs{}function Rh(m){return m instanceof jy}class By extends hs{}function tu(m){return m instanceof By}return Ke.$INTERNAL_isPointSelection=rr,Ke.$addUpdateTag=bh,Ke.$applyNodeReplacement=da,Ke.$copyNode=Vs,Ke.$createLineBreakNode=Nr,Ke.$createNodeSelection=Eh,Ke.$createParagraphNode=Bi,Ke.$createRangeSelection=u1,Ke.$createTabNode=wa,Ke.$createTextNode=Kn,Ke.$getAdjacentNode=ua,Ke.$getNearestNodeFromDOMNode=Zr,Ke.$getNearestRootOrShadowRoot=Lc,Ke.$getNodeByKey=Ln,Ke.$getPreviousSelection=sl,Ke.$getRoot=fr,Ke.$getSelection=xn,Ke.$getTextContent=m1,Ke.$hasAncestor=Fn,Ke.$hasUpdateTag=ld,Ke.$insertNodes=g1,Ke.$isBlockElementNode=c1,Ke.$isDecoratorNode=Wn,Ke.$isElementNode=rt,Ke.$isInlineElementOrDecoratorNode=Us,Ke.$isLeafNode=wo,Ke.$isLineBreakNode=$o,Ke.$isNodeSelection=gr,Ke.$isParagraphNode=$1,Ke.$isRangeSelection=Tt,Ke.$isRootNode=to,Ke.$isRootOrShadowRoot=er,Ke.$isTabNode=ds,Ke.$isTextNode=St,Ke.$nodesOfType=Ic,Ke.$normalizeSelection__EXPERIMENTAL=ia,Ke.$parseSerializedNode=x1,Ke.$selectAll=Ri,Ke.$setCompositionKey=Mn,Ke.$setSelection=hr,Ke.$splitNode=Fc,Ke.BLUR_COMMAND=q,Ke.CAN_REDO_COMMAND=w,Ke.CAN_UNDO_COMMAND=N,Ke.CLEAR_EDITOR_COMMAND=J,Ke.CLEAR_HISTORY_COMMAND=F,Ke.CLICK_COMMAND=n,Ke.COMMAND_PRIORITY_CRITICAL=I1,Ke.COMMAND_PRIORITY_EDITOR=D1,Ke.COMMAND_PRIORITY_HIGH=P1,Ke.COMMAND_PRIORITY_LOW=k1,Ke.COMMAND_PRIORITY_NORMAL=M1,Ke.CONTROLLED_TEXT_INSERTION_COMMAND=a,Ke.COPY_COMMAND=ne,Ke.CUT_COMMAND=B,Ke.DELETE_CHARACTER_COMMAND=r,Ke.DELETE_LINE_COMMAND=g,Ke.DELETE_WORD_COMMAND=p,Ke.DEPRECATED_$computeGridMap=Ty,Ke.DEPRECATED_$createGridSelection=d1,Ke.DEPRECATED_$getGridCellNodeRect=Wr,Ke.DEPRECATED_$getNodeTriplet=Ny,Ke.DEPRECATED_$isGridCellNode=vo,Ke.DEPRECATED_$isGridNode=Rh,Ke.DEPRECATED_$isGridRowNode=tu,Ke.DEPRECATED_$isGridSelection=Ir,Ke.DEPRECATED_GridCellNode=Ah,Ke.DEPRECATED_GridNode=jy,Ke.DEPRECATED_GridRowNode=By,Ke.DRAGEND_COMMAND=ee,Ke.DRAGOVER_COMMAND=j,Ke.DRAGSTART_COMMAND=V,Ke.DROP_COMMAND=te,Ke.DecoratorNode=Sh,Ke.ElementNode=hs,Ke.FOCUS_COMMAND=I,Ke.FORMAT_ELEMENT_COMMAND=fe,Ke.FORMAT_TEXT_COMMAND=_,Ke.INDENT_CONTENT_COMMAND=de,Ke.INSERT_LINE_BREAK_COMMAND=o,Ke.INSERT_PARAGRAPH_COMMAND=i,Ke.INSERT_TAB_COMMAND=Q,Ke.KEY_ARROW_DOWN_COMMAND=P,Ke.KEY_ARROW_LEFT_COMMAND=O,Ke.KEY_ARROW_RIGHT_COMMAND=v,Ke.KEY_ARROW_UP_COMMAND=k,Ke.KEY_BACKSPACE_COMMAND=X,Ke.KEY_DELETE_COMMAND=Z,Ke.KEY_DOWN_COMMAND=y,Ke.KEY_ENTER_COMMAND=M,Ke.KEY_ESCAPE_COMMAND=oe,Ke.KEY_MODIFIER_COMMAND=ue,Ke.KEY_SPACE_COMMAND=Y,Ke.KEY_TAB_COMMAND=U,Ke.LineBreakNode=Jn,Ke.MOVE_TO_END=T,Ke.MOVE_TO_START=R,Ke.OUTDENT_CONTENT_COMMAND=pe,Ke.PASTE_COMMAND=l,Ke.ParagraphNode=ul,Ke.REDO_COMMAND=b,Ke.REMOVE_TEXT_COMMAND=u,Ke.RootNode=cl,Ke.SELECTION_CHANGE_COMMAND=t,Ke.SELECT_ALL_COMMAND=W,Ke.TabNode=li,Ke.TextNode=si,Ke.UNDO_COMMAND=C,Ke.createCommand=e,Ke.createEditor=F1,Ke.getNearestEditorFromDOMNode=Ti,Ke.isHTMLAnchorElement=ki,Ke.isHTMLElement=ri,Ke.isSelectionCapturedInDecoratorInput=Cc,Ke.isSelectionWithinEditor=Qo,Ke}var Ue={},kb;function V9(){if(kb)return Ue;kb=1;let e={},t={},n={},r={},o={},i={},a={},l={},u={},p={},g={},_={},C={},b={},y={},v={},T={},O={},R={},k={},P={},M={},Y={},X={},oe={},Z={},U={},Q={},de={},pe={},te={},fe={},V={},j={},ee={},ne={};function B(f){let s=new URLSearchParams;s.append("code",f);for(let d=1;d<arguments.length;d++)s.append("v",arguments[d]);throw Error(`Minified Lexical error #${f}; visit https://lexical.dev/docs/error?${s} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let W=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",J=W&&"documentMode"in document?document.documentMode:null,F=W&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),w=W&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),N=W&&"InputEvent"in window&&!J?"getTargetRanges"in new window.InputEvent("input"):!1,I=W&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),q=W&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ue=W&&/Android/.test(navigator.userAgent),he=W&&/^(?=.*Chrome).*/i.test(navigator.userAgent),se=W&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!he,Ce=I||q||se?" ":"",Oe=w?" ":Ce,Be=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,ce=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,le={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},ve={directionless:1,unmergeable:2},Me={center:2,end:6,justify:4,left:1,right:3,start:5},Pe={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},We={normal:0,segmented:2,token:1},Xe={0:"normal",2:"segmented",1:"token"},st=!1,dt=0;function Ct(f){dt=f.timeStamp}function Se(f,s,d){return s.__lexicalLineBreak===f||f[`__lexicalKey_${d._key}`]!==void 0}function me(f){return f.getEditorState().read(()=>{let s=pn();return s!==null?s.clone():null})}function _e(f,s,d){st=!0;let x=100<performance.now()-dt;try{Pr(f,()=>{let A=pn()||me(f);var D=new Map,z=f.getRootElement(),ie=f._editorState,xe=f._blockCursorElement;let Re=!1,Ve="";for(var Ze=0;Ze<s.length;Ze++){var Ge=s[Ze],Ie=Ge.type,it=Ge.target,vt=Er(it,ie);if(!(vt===null&&it!==z||on(vt))){if(Ie==="characterData"){if(Ge=x&&Nt(vt))e:{Ge=A,Ie=it;var $t=vt;if(Lt(Ge)){var Vt=Ge.anchor.getNode();if(Vt.is($t)&&Ge.format!==Vt.getFormat()){Ge=!1;break e}}Ge=Ie.nodeType===3&&$t.isAttached()}Ge&&($t=ho(f._window),Ie=Ge=null,$t!==null&&$t.anchorNode===it&&(Ge=$t.anchorOffset,Ie=$t.focusOffset),it=it.nodeValue,it!==null&&je(vt,it,Ge,Ie,!1))}else if(Ie==="childList"){for(Re=!0,Ie=Ge.addedNodes,$t=0;$t<Ie.length;$t++){Vt=Ie[$t];var Rn=ur(Vt),Jn=Vt.parentNode;Jn==null||Vt===xe||Rn!==null||Vt.nodeName==="BR"&&Se(Vt,Jn,f)||(w&&(Rn=Vt.innerText||Vt.nodeValue)&&(Ve+=Rn),Jn.removeChild(Vt))}if(Ge=Ge.removedNodes,Ie=Ge.length,0<Ie){for($t=0,Vt=0;Vt<Ie;Vt++)Jn=Ge[Vt],(Jn.nodeName==="BR"&&Se(Jn,it,f)||xe===Jn)&&(it.appendChild(Jn),$t++);Ie!==$t&&(it===z&&(vt=ie._nodeMap.get("root")),D.set(it,vt))}}}}if(0<D.size)for(let[cs,Nr]of D)if(nt(Nr))for(D=Nr.getChildrenKeys(),z=cs.firstChild,ie=0;ie<D.length;ie++)xe=f.getElementByKey(D[ie]),xe!==null&&(z==null?(cs.appendChild(xe),z=xe):z!==xe&&cs.replaceChild(xe,z),z=z.nextSibling);else Nt(Nr)&&Nr.markDirty();if(D=d.takeRecords(),0<D.length){for(z=0;z<D.length;z++)for(xe=D[z],ie=xe.addedNodes,xe=xe.target,Ze=0;Ze<ie.length;Ze++)vt=ie[Ze],it=vt.parentNode,it==null||vt.nodeName!=="BR"||Se(vt,xe,f)||it.removeChild(vt);d.takeRecords()}A!==null&&(Re&&(A.dirty=!0,br(A)),w&&Ut(f)&&A.insertRawText(Ve))})}finally{st=!1}}function De(f){let s=f._observer;if(s!==null){let d=s.takeRecords();_e(f,d,s)}}function Fe(f){dt===0&&wn(f).addEventListener("textInput",Ct,!0),f._observer=new MutationObserver((s,d)=>{_e(f,s,d)})}function ke(f,s){let d=f.__mode,x=f.__format;f=f.__style;let A=s.__mode,D=s.__format;return s=s.__style,(d===null||d===A)&&(x===null||x===D)&&(f===null||f===s)}function ze(f,s){let d=f.mergeWithSibling(s),x=_n()._normalizedNodes;return x.add(f.__key),x.add(s.__key),d}function tt(f){if(f.__text===""&&f.isSimpleText()&&!f.isUnmergeable())f.remove();else{for(var s;(s=f.getPreviousSibling())!==null&&Nt(s)&&s.isSimpleText()&&!s.isUnmergeable();)if(s.__text==="")s.remove();else{ke(s,f)&&(f=ze(s,f));break}for(var d;(d=f.getNextSibling())!==null&&Nt(d)&&d.isSimpleText()&&!d.isUnmergeable();)if(d.__text==="")d.remove();else{ke(f,d)&&ze(f,d);break}}}function ut(f){return Et(f.anchor),Et(f.focus),f}function Et(f){for(;f.type==="element";){var s=f.getNode(),d=f.offset;if(d===s.getChildrenSize()?(s=s.getChildAtIndex(d-1),d=!0):(s=s.getChildAtIndex(d),d=!1),Nt(s)){f.set(s.__key,d?s.getTextContentSize():0,"text");break}else if(!nt(s))break;f.set(s.__key,d?s.getChildrenSize():0,"element")}}let Bt=1,Qe=typeof queueMicrotask=="function"?queueMicrotask:f=>{Promise.resolve().then(f)};function et(f){let s=document.activeElement;if(s===null)return!1;let d=s.nodeName;return on(Er(f))&&(d==="INPUT"||d==="TEXTAREA"||s.contentEditable==="true"&&s.__lexicalEditor==null)}function lt(f,s,d){let x=f.getRootElement();try{return x!==null&&x.contains(s)&&x.contains(d)&&s!==null&&!et(s)&&wt(s)===f}catch{return!1}}function wt(f){for(;f!=null;){let s=f.__lexicalEditor;if(s!=null)return s;f=yn(f)}return null}function _t(f){return f.isToken()||f.isSegmented()}function Rt(f){for(;f!=null;){if(f.nodeType===3)return f;f=f.firstChild}return null}function qe(f,s,d){let x=le[s];return d!==null&&(f&x)===(d&x)||(f^=x,s==="subscript"?f&=~le.superscript:s==="superscript"&&(f&=~le.subscript)),f}function ot(f,s){if(s!=null)f.__key=s;else{tr(),99<ga&&B(14),s=_n();var d=Jr(),x=""+Bt++;d._nodeMap.set(x,f),nt(f)?s._dirtyElements.set(x,!0):s._dirtyLeaves.add(x),s._cloneNotNeeded.add(x),s._dirtyType=1,f.__key=x}}function yt(f){var s=f.getParent();if(s!==null){let A=f.getWritable();s=s.getWritable();var d=f.getPreviousSibling();if(f=f.getNextSibling(),d===null)if(f!==null){var x=f.getWritable();s.__first=f.__key,x.__prev=null}else s.__first=null;else{if(x=d.getWritable(),f!==null){let D=f.getWritable();D.__prev=x.__key,x.__next=D.__key}else x.__next=null;A.__prev=null}f===null?d!==null?(f=d.getWritable(),s.__last=d.__key,f.__next=null):s.__last=null:(f=f.getWritable(),d!==null?(d=d.getWritable(),d.__next=f.__key,f.__prev=d.__key):f.__prev=null,A.__next=null),s.__size--,A.__parent=null}}function kt(f){99<ga&&B(14);var s=f.getLatest(),d=s.__parent,x=Jr();let A=_n(),D=x._nodeMap;if(x=A._dirtyElements,d!==null)e:for(;d!==null;){if(x.has(d))break e;let z=D.get(d);if(z===void 0)break;x.set(d,!1),d=z.__parent}s=s.__key,A._dirtyType=1,nt(f)?x.set(s,!0):A._dirtyLeaves.add(s)}function Dt(f){tr();var s=_n();let d=s._compositionKey;f!==d&&(s._compositionKey=f,d!==null&&(s=sn(d),s!==null&&s.getWritable()),f!==null&&(f=sn(f),f!==null&&f.getWritable()))}function Kt(){return ma()?null:_n()._compositionKey}function sn(f,s){return f=(s||Jr())._nodeMap.get(f),f===void 0?null:f}function ur(f,s){let d=_n();return f=f[`__lexicalKey_${d._key}`],f!==void 0?sn(f,s):null}function Er(f,s){for(;f!=null;){let d=ur(f,s);if(d!==null)return d;f=yn(f)}return null}function Jo(f){let s=Object.assign({},f._decorators);return f._pendingDecorators=s}function ra(f){return f.read(()=>qn().getTextContent())}function Cr(f,s){Pr(f,()=>{var d=Jr();if(!d.isEmpty())if(s==="root")qn().markDirty();else{d=d._nodeMap;for(let[,x]of d)x.markDirty()}},f._pendingEditorState===null?{tag:"history-merge"}:void 0)}function qn(){return Jr()._nodeMap.get("root")}function br(f){tr();let s=Jr();f!==null&&(f.dirty=!0,f.setCachedNodes(null)),s._selection=f}function fo(f){var s=_n(),d;e:{for(d=f;d!=null;){let x=d[`__lexicalKey_${s._key}`];if(x!==void 0){d=x;break e}d=yn(d)}d=null}return d===null?(s=s.getRootElement(),f===s?sn("root"):null):sn(d)}function oa(f){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(f)}function Ee(f){let s=[];for(;f!==null;)s.push(f),f=f._parentEditor;return s}function ae(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function $e(f,s,d){if(s=ho(s._window),s!==null){var x=s.anchorNode,{anchorOffset:A,focusOffset:D}=s;if(x!==null&&(s=x.nodeType===3?x.nodeValue:null,x=Er(x),s!==null&&Nt(x))){if(s===Ce&&d){let z=d.length;s=d,D=A=z}s!==null&&je(x,s,A,D,f)}}}function je(f,s,d,x,A){let D=f;if(D.isAttached()&&(A||!D.isDirty())){let Re=D.isComposing(),Ve=s;if((Re||A)&&s[s.length-1]===Ce&&(Ve=s.slice(0,-1)),s=D.getTextContent(),A||Ve!==s)if(Ve==="")if(Dt(null),I||q||se)D.remove();else{let Ze=_n();setTimeout(()=>{Ze.update(()=>{D.isAttached()&&D.remove()})},20)}else{A=D.getParent(),s=oi();var z=D.getTextContentSize(),ie=Kt(),xe=D.getKey();D.isToken()||ie!==null&&xe===ie&&!Re||Lt(s)&&(A!==null&&!A.canInsertTextBefore()&&s.anchor.offset===0||s.anchor.key===f.__key&&s.anchor.offset===0&&!D.canInsertTextBefore()||s.focus.key===f.__key&&s.focus.offset===z&&!D.canInsertTextAfter())?D.markDirty():(f=pn(),Lt(f)&&d!==null&&x!==null&&(f.setTextNodeRange(D,d,D,x),D.isSegmented()&&(d=D.getTextContent(),d=Fn(d),D.replace(d),D=d)),D.setTextContent(Ve))}}}function at(f,s){if(s.isSegmented())return!0;if(!f.isCollapsed())return!1;f=f.anchor.offset;let d=s.getParentOrThrow(),x=s.isToken();return f===0?((f=!s.canInsertTextBefore()||!d.canInsertTextBefore()||x)||(s=s.getPreviousSibling(),f=(Nt(s)||nt(s)&&s.isInline())&&!s.canInsertTextAfter()),f):f===s.getTextContentSize()?!s.canInsertTextAfter()||!d.canInsertTextAfter()||x:!1}function xt(f,s){f.__lexicalClassNameCache===void 0&&(f.__lexicalClassNameCache={});let d=f.__lexicalClassNameCache,x=d[s];return x!==void 0?x:(f=f[s],typeof f=="string"?(f=f.split(" "),d[s]=f):f)}function bt(f,s,d,x,A){d.size!==0&&(d=x.__type,x=x.__key,s=s.get(d),s===void 0&&B(33,d),d=s.klass,s=f.get(d),s===void 0&&(s=new Map,f.set(d,s)),f=s.get(x),d=f==="destroyed"&&A==="created",(f===void 0||d)&&s.set(x,d?"updated":A))}function ht(f,s,d){let x=f.getParent(),A=d;return x!==null&&(s&&d===0?(A=f.getIndexWithinParent(),f=x):s||d!==f.getChildrenSize()||(A=f.getIndexWithinParent()+1,f=x)),f.getChildAtIndex(s?A-1:A)}function At(f,s){var d=f.offset;return f.type==="element"?(f=f.getNode(),ht(f,s,d)):(f=f.getNode(),s&&d===0||!s&&d===f.getTextContentSize()?(d=s?f.getPreviousSibling():f.getNextSibling(),d===null?ht(f.getParentOrThrow(),s,f.getIndexWithinParent()+(s?0:1)):d):null)}function Ut(f){return f=(f=wn(f).event)&&f.inputType,f==="insertFromPaste"||f==="insertFromPasteAsQuotation"}function Mt(f){return!Tr(f)&&!f.isLastChild()&&!f.isInline()}function Yt(f,s){return f=f._keyToDOMMap.get(s),f===void 0&&B(75,s),f}function yn(f){return f=f.assignedSlot||f.parentElement,f!==null&&f.nodeType===11?f.host:f}function _r(f,s){for(f=f.getParent();f!==null;){if(f.is(s))return!0;f=f.getParent()}return!1}function wn(f){return f=f._window,f===null&&B(78),f}function Zn(f){for(f=f.getParentOrThrow();f!==null&&!Mr(f);)f=f.getParentOrThrow();return f}function Mr(f){return Tr(f)||nt(f)&&f.isShadowRoot()}function ia(f){return f=f.constructor.clone(f),ot(f,null),f}function Xo(f){var s=_n();let d=f.constructor.getType();return s=s._nodes.get(d),s===void 0&&B(97),s=s.replace,s!==null?(s=s(f),s instanceof f.constructor||B(98),s):f}function _c(f,s){f=f.getParent(),!Tr(f)||nt(s)||on(s)||B(99)}function xc(f){return(on(f)||nt(f)&&!f.canBeEmpty())&&!f.isInline()}function Ec(f,s,d){d.style.removeProperty("caret-color"),s._blockCursorElement=null,s=f.parentElement,s!==null&&s.removeChild(f)}function ho(f){return W?(f||window).getSelection():null}function Is(f,s){for(;f!==qn()&&f!=null;){if(s(f))return f;f=f.getParent()}return null}function Cc(f){let s=[],d=[f];for(;0<d.length;){let x=d.pop();x===void 0&&B(112),nt(x)&&d.unshift(...x.getChildren()),x!==f&&s.push(x)}return s}function Qo(f){return f.nodeType===1}function Ti(f){if(on(f)&&!f.isInline())return!0;if(!nt(f)||Mr(f))return!1;var s=f.getFirstChild();return s=s===null||Ri(s)||Nt(s)||s.isInline(),!f.isInline()&&f.canBeEmpty()!==!1&&s}function wc(f,s){for(;f!==null&&f.getParent()!==null&&!s(f);)f=f.getParentOrThrow();return s(f)?f:null}function Ls(f,s,d,x,A,D){for(f=f.getFirstChild();f!==null;){let z=f.__key;f.__parent===s&&(nt(f)&&Ls(f,z,d,x,A,D),d.has(z)||D.delete(z),A.push(z)),f=f.getNextSibling()}}function ch(f,s,d,x){f=f._nodeMap,s=s._nodeMap;let A=[];for(let[D]of x){let z=s.get(D);z===void 0||z.isAttached()||(nt(z)&&Ls(z,D,f,s,A,x),f.has(D)||x.delete(D),A.push(D))}for(let D of A)s.delete(D);for(let D of d)x=s.get(D),x===void 0||x.isAttached()||(f.has(D)||d.delete(D),s.delete(D))}let An="",Qn="",wo="",To,dr,Yr,Ga=!1,Tc=!1,Mn,qr=null,Ln,Fs,Zr,No,js,Ka;function fr(f,s){let d=Zr.get(f);if(s!==null){let x=Rc(f);x.parentNode===s&&s.removeChild(x)}No.has(f)||dr._keyToDOMMap.delete(f),nt(d)&&(f=Va(d,Zr),Bs(f,0,f.length-1,null)),d!==void 0&&bt(Ka,Yr,Mn,d,"destroyed")}function Bs(f,s,d,x){for(;s<=d;++s){let A=f[s];A!==void 0&&fr(A,x)}}function hr(f,s){f.setProperty("text-align",s)}function Xu(f,s){var d=To.theme.indent;if(typeof d=="string"){let x=f.classList.contains(d);0<s&&!x?f.classList.add(d):1>s&&x&&f.classList.remove(d)}d=getComputedStyle(f).getPropertyValue("--lexical-indent-base-value")||"40px",f.style.setProperty("padding-inline-start",s===0?"":`calc(${s} * ${d})`)}function Ni(f,s){f=f.style,s===0?hr(f,""):s===1?hr(f,"left"):s===2?hr(f,"center"):s===3?hr(f,"right"):s===4?hr(f,"justify"):s===5?hr(f,"start"):s===6&&hr(f,"end")}function Ua(f,s,d){let x=No.get(f);x===void 0&&B(60);let A=x.createDOM(To,dr);var D=dr._keyToDOMMap;if(A["__lexicalKey_"+dr._key]=f,D.set(f,A),Nt(x)?A.setAttribute("data-lexical-text","true"):on(x)&&A.setAttribute("data-lexical-decorator","true"),nt(x)){if(f=x.__indent,D=x.__size,f!==0&&Xu(A,f),D!==0){--D,f=Va(x,No);var z=Qn;Qn="",Nc(f,x,0,D,A,null),Oc(x,A),Qn=z}f=x.__format,f!==0&&Ni(A,f),x.isInline()||Ws(null,x,A),Mt(x)&&(An+=`
|
|
242
|
+
|
|
243
|
+
`,wo+=`
|
|
244
|
+
|
|
245
|
+
`)}else D=x.getTextContent(),on(x)?(z=x.decorate(dr,To),z!==null&&zs(f,z),A.contentEditable="false"):Nt(x)&&(x.isDirectionless()||(Qn+=D)),An+=D,wo+=D;return s!==null&&(d!=null?s.insertBefore(A,d):(d=s.__lexicalLineBreak,d!=null?s.insertBefore(A,d):s.appendChild(A))),bt(Ka,Yr,Mn,x,"created"),A}function Nc(f,s,d,x,A,D){let z=An;for(An="";d<=x;++d)Ua(f[d],A,D);Mt(s)&&(An+=`
|
|
246
|
+
|
|
247
|
+
`),A.__lexicalTextContent=An,An=z+An}function Sc(f,s){return f=s.get(f),Ri(f)||on(f)&&f.isInline()}function Ws(f,s,d){f=f!==null&&(f.__size===0||Sc(f.__last,Zr)),s=s.__size===0||Sc(s.__last,No),f?s||(s=d.__lexicalLineBreak,s!=null&&d.removeChild(s),d.__lexicalLineBreak=null):s&&(s=document.createElement("br"),d.__lexicalLineBreak=s,d.appendChild(s))}function Oc(f,s){var d=s.__lexicalDir;if(s.__lexicalDirTextContent!==Qn||d!==qr){let D=Qn==="";if(D)var x=qr;else x=Qn,x=Be.test(x)?"rtl":ce.test(x)?"ltr":null;if(x!==d){let z=s.classList,ie=To.theme;var A=d!==null?ie[d]:void 0;let xe=x!==null?ie[x]:void 0;A!==void 0&&(typeof A=="string"&&(A=A.split(" "),A=ie[d]=A),z.remove(...A)),x===null||D&&x==="ltr"?s.removeAttribute("dir"):(xe!==void 0&&(typeof xe=="string"&&(d=xe.split(" "),xe=ie[x]=d),xe!==void 0&&z.add(...xe)),s.dir=x),Tc||(f.getWritable().__dir=x)}qr=x,s.__lexicalDirTextContent=Qn,s.__lexicalDir=x}}function Va(f,s){let d=[];for(f=f.__first;f!==null;){let x=s.get(f);x===void 0&&B(101),d.push(f),f=x.__next}return d}function Si(f,s){var d=Zr.get(f),x=No.get(f);d!==void 0&&x!==void 0||B(61);var A=Ga||Fs.has(f)||Ln.has(f);let D=Yt(dr,f);if(d===x&&!A)return nt(d)?(x=D.__lexicalTextContent,x!==void 0&&(An+=x,wo+=x),x=D.__lexicalDirTextContent,x!==void 0&&(Qn+=x)):(x=d.getTextContent(),Nt(d)&&!d.isDirectionless()&&(Qn+=x),wo+=x,An+=x),D;if(d!==x&&A&&bt(Ka,Yr,Mn,x,"updated"),x.updateDOM(d,D,To))return x=Ua(f,null,null),s===null&&B(62),s.replaceChild(x,D),fr(f,null),x;if(nt(d)&&nt(x)){if(f=x.__indent,f!==d.__indent&&Xu(D,f),f=x.__format,f!==d.__format&&Ni(D,f),A){f=x,A=Qn,Qn="",s=An;var z=d.__size,ie=f.__size;if(An="",z===1&&ie===1){var xe=d.__first,Re=f.__first;if(xe===Re)Si(xe,D);else{var Ve=Rc(xe);Re=Ua(Re,null,null),D.replaceChild(Re,Ve),fr(xe,null)}}else{Re=Va(d,Zr);var Ze=Va(f,No);if(z===0)ie!==0&&Nc(Ze,f,0,ie-1,D,null);else if(ie===0)z!==0&&(xe=D.__lexicalLineBreak==null,Bs(Re,0,z-1,xe?null:D),xe&&(D.textContent=""));else{var Ge=Re;Re=Ze,Ze=z-1,z=ie-1;let it=D.firstChild,vt=0;for(ie=0;vt<=Ze&&ie<=z;){var Ie=Ge[vt];let $t=Re[ie];if(Ie===$t)it=Ac(Si($t,D)),vt++,ie++;else{xe===void 0&&(xe=new Set(Ge)),Ve===void 0&&(Ve=new Set(Re));let Vt=Ve.has(Ie),Rn=xe.has($t);Vt?(Rn?(Ie=Yt(dr,$t),Ie===it?it=Ac(Si($t,D)):(it!=null?D.insertBefore(Ie,it):D.appendChild(Ie),Si($t,D)),vt++):Ua($t,D,it),ie++):(it=Ac(Rc(Ie)),fr(Ie,D),vt++)}}xe=vt>Ze,Ve=ie>z,xe&&!Ve?(xe=Re[z+1],xe=xe===void 0?null:dr.getElementByKey(xe),Nc(Re,f,ie,z,D,xe)):Ve&&!xe&&Bs(Ge,vt,Ze,D)}}Mt(f)&&(An+=`
|
|
248
|
+
|
|
249
|
+
`),D.__lexicalTextContent=An,An=s+An,Oc(f,D),Qn=A,Tr(x)||x.isInline()||Ws(d,x,D)}Mt(x)&&(An+=`
|
|
250
|
+
|
|
251
|
+
`,wo+=`
|
|
252
|
+
|
|
253
|
+
`)}else d=x.getTextContent(),on(x)?(A=x.decorate(dr,To),A!==null&&zs(f,A)):Nt(x)&&!x.isDirectionless()&&(Qn+=d),An+=d,wo+=d;return!Tc&&Tr(x)&&x.__cachedText!==wo&&(x=x.getWritable(),x.__cachedText=wo),D}function zs(f,s){let d=dr._pendingDecorators,x=dr._decorators;if(d===null){if(x[f]===s)return;d=Jo(dr)}d[f]=s}function Ac(f){return f=f.nextSibling,f!==null&&f===dr._blockCursorElement&&(f=f.nextSibling),f}function Rc(f){let s=js.get(f);return s===void 0&&B(75,f),s}let So=Object.freeze({}),$c=[["keydown",mh],["pointerdown",dh],["compositionstart",ph],["compositionend",gh],["input",hh],["click",uh],["cut",So],["copy",So],["dragstart",So],["dragover",So],["dragend",So],["paste",So],["focus",So],["blur",So],["drop",So]];N&&$c.push(["beforeinput",(f,s)=>fh(f,s)]);let Ya=0,Qu=0,ed=0,aa=null,qa=0,Dc=!1,kc=!1,Za=!1,Ja=!1,td=[0,"",0,"root",0];function nd(f,s,d,x,A){let D=f.anchor,z=f.focus,ie=D.getNode();var xe=_n();let Re=ho(xe._window),Ve=Re!==null?Re.anchorNode:null,Ze=D.key;xe=xe.getElementByKey(Ze);let Ge=d.length;return Ze!==z.key||!Nt(ie)||(!A&&(!N||ed<x+50)||ie.isDirty()&&2>Ge||oa(d))&&D.offset!==z.offset&&!ie.isComposing()||_t(ie)||ie.isDirty()&&1<Ge||(A||!N)&&xe!==null&&!ie.isComposing()&&Ve!==Rt(xe)||Re!==null&&s!==null&&(!s.collapsed||s.startContainer!==Re.anchorNode||s.startOffset!==Re.anchorOffset)||ie.getFormat()!==f.format||ie.getStyle()!==f.style||at(f,ie)}function rd(f,s){return f!==null&&f.nodeValue!==null&&f.nodeType===3&&s!==0&&s!==f.nodeValue.length}function od(f,s,d){let{anchorNode:x,anchorOffset:A,focusNode:D,focusOffset:z}=f;Dc&&(Dc=!1,rd(x,A)&&rd(D,z))||Pr(s,()=>{if(!d)br(null);else if(lt(s,x,D)){var ie=pn();if(Lt(ie)){var xe=ie.anchor,Re=xe.getNode();if(ie.isCollapsed()){f.type==="Range"&&f.anchorNode===f.focusNode&&(ie.dirty=!0);var Ve=wn(s).event;Ve=Ve?Ve.timeStamp:performance.now();let[Ge,Ie,it,vt,$t]=td;var Ze=qn();Ze=s.isComposing()===!1&&Ze.getTextContent()==="",Ve<$t+200&&xe.offset===it&&xe.key===vt?(ie.format=Ge,ie.style=Ie):xe.type==="text"?(ie.format=Re.getFormat(),ie.style=Re.getStyle()):xe.type!=="element"||Ze||(ie.format=0,ie.style="")}else{xe=255,Re=!1,Ve=ie.getNodes(),Ze=Ve.length;for(let Ge=0;Ge<Ze;Ge++){let Ie=Ve[Ge];if(Nt(Ie)&&(Re=!0,xe&=Ie.getFormat(),xe===0))break}ie.format=Re?xe:0}}pt(s,e,void 0)}})}function uh(f,s){Pr(s,()=>{let d=pn();var x=ho(s._window);let A=oi();if(x)if(Lt(d)){let z=d.anchor;var D=z.getNode();z.type==="element"&&z.offset===0&&d.isCollapsed()&&!Tr(D)&&qn().getChildrenSize()===1&&D.getTopLevelElementOrThrow().isEmpty()&&A!==null&&d.is(A)?(x.removeAllRanges(),d.dirty=!0):f.detail!==3||d.isCollapsed()||(x=d.focus.getNode(),D!==x&&(nt(D)?D.select(0):D.getParentOrThrow().select(0)))}else f.pointerType==="touch"&&(D=x.anchorNode,D!==null&&(D=D.nodeType,D===1||D===3))&&(x=Mi(A,x,s),br(x));pt(s,t,f)})}function dh(f,s){let d=f.target;f=f.pointerType,d instanceof Node&&f!=="touch"&&Pr(s,()=>{on(Er(d))||(kc=!0)})}function Mc(f){return f.getTargetRanges?(f=f.getTargetRanges(),f.length===0?null:f[0]):null}function id(f,s){return f!==s||nt(f)||nt(s)||!f.isToken()||!s.isToken()}function fh(f,s){let d=f.inputType,x=Mc(f);d==="deleteCompositionText"||w&&Ut(s)||d!=="insertCompositionText"&&Pr(s,()=>{let A=pn();if(d==="deleteContentBackward"){if(A===null){var D=oi();if(!Lt(D))return;br(D.clone())}if(Lt(A)){ue&&Dt(A.anchor.key),Qu===229&&f.timeStamp<Ya+30&&s.isComposing()&&A.anchor.key===A.focus.key?(Dt(null),Ya=0,setTimeout(()=>{Pr(s,()=>{Dt(null)})},30),Lt(A)&&(D=A.anchor.getNode(),D.markDirty(),A.format=D.getFormat(),A.style=D.getStyle()),1>=A.anchor.getNode().getTextContent().length&&(f.preventDefault(),pt(s,n,!0))):(f.preventDefault(),pt(s,n,!0));return}}if(Lt(A)){D=f.data,aa!==null&&$e(!1,s,aa),A.dirty&&aa===null||!A.isCollapsed()||Tr(A.anchor.getNode())||x===null||A.applyDOMRange(x),aa=null;var z=A.focus,ie=A.anchor.getNode();if(z=z.getNode(),d==="insertText"||d==="insertTranspose")D===`
|
|
254
|
+
`?(f.preventDefault(),pt(s,r,!1)):D===`
|
|
255
|
+
|
|
256
|
+
`?(f.preventDefault(),pt(s,o,void 0)):D==null&&f.dataTransfer?(D=f.dataTransfer.getData("text/plain"),f.preventDefault(),A.insertRawText(D)):D!=null&&nd(A,x,D,f.timeStamp,!0)?(f.preventDefault(),pt(s,i,D)):aa=D,ed=f.timeStamp;else switch(f.preventDefault(),d){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":pt(s,i,f);break;case"insertFromComposition":Dt(null),pt(s,i,f);break;case"insertLineBreak":Dt(null),pt(s,r,!1);break;case"insertParagraph":Dt(null),Za&&!q?(Za=!1,pt(s,r,!1)):pt(s,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":pt(s,a,f);break;case"deleteByComposition":id(ie,z)&&pt(s,l,f);break;case"deleteByDrag":case"deleteByCut":pt(s,l,f);break;case"deleteContent":pt(s,n,!1);break;case"deleteWordBackward":pt(s,u,!0);break;case"deleteWordForward":pt(s,u,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":pt(s,p,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":pt(s,p,!1);break;case"formatStrikeThrough":pt(s,g,"strikethrough");break;case"formatBold":pt(s,g,"bold");break;case"formatItalic":pt(s,g,"italic");break;case"formatUnderline":pt(s,g,"underline");break;case"historyUndo":pt(s,_,void 0);break;case"historyRedo":pt(s,C,void 0)}}})}function hh(f,s){f.stopPropagation(),Pr(s,()=>{var d=pn(),x=f.data,A=Mc(f);if(x!=null&&Lt(d)&&nd(d,A,x,f.timeStamp,!1)){Ja&&(Pc(s,x),Ja=!1);var D=d.anchor,z=D.getNode();if(A=ho(s._window),A===null)return;let ie=D.offset;(D=N&&!d.isCollapsed()&&Nt(z)&&A.anchorNode!==null)&&(z=z.getTextContent().slice(0,ie)+x+z.getTextContent().slice(ie+d.focus.offset),A=A.anchorNode,D=z===(A.nodeType===3?A.nodeValue:null)),D||pt(s,i,x),x=x.length,w&&1<x&&f.inputType==="insertCompositionText"&&!s.isComposing()&&(d.anchor.offset-=x),I||q||se||!s.isComposing()||(Ya=0,Dt(null))}else $e(!1,s,x!==null?x:void 0),Ja&&(Pc(s,x||void 0),Ja=!1);tr(),d=_n(),De(d)}),aa=null}function ph(f,s){Pr(s,()=>{let d=pn();if(Lt(d)&&!s.isComposing()){let x=d.anchor,A=d.anchor.getNode();Dt(x.key),(f.timeStamp<Ya+30||x.type==="element"||!d.isCollapsed()||A.getFormat()!==d.format||A.getStyle()!==d.style)&&pt(s,i,Oe)}})}function Pc(f,s){var d=f._compositionKey;if(Dt(null),d!==null&&s!=null){if(s===""){s=sn(d),f=Rt(f.getElementByKey(d)),f!==null&&f.nodeValue!==null&&Nt(s)&&je(s,f.nodeValue,null,null,!0);return}if(s[s.length-1]===`
|
|
257
|
+
`&&(d=pn(),Lt(d))){s=d.focus,d.anchor.set(s.key,s.offset,s.type),pt(f,P,null);return}}$e(!0,f,s)}function gh(f,s){w?Ja=!0:Pr(s,()=>{Pc(s,f.data)})}function mh(f,s){if(Ya=f.timeStamp,Qu=f.keyCode,!s.isComposing()){var{keyCode:d,shiftKey:x,ctrlKey:A,metaKey:D,altKey:z}=f;if(!pt(s,b,f)){if(d!==39||A||D||z)if(d!==39||z||x||!A&&!D)if(d!==37||A||D||z)if(d!==37||z||x||!A&&!D)if(d!==38||A||D)if(d!==40||A||D)if(d===13&&x)Za=!0,pt(s,P,f);else if(d===32)pt(s,M,f);else if(F&&A&&d===79)f.preventDefault(),Za=!0,pt(s,r,!0);else if(d!==13||x){var ie=F?z||D?!1:d===8||d===72&&A:A||z||D?!1:d===8;ie?d===8?pt(s,Y,f):(f.preventDefault(),pt(s,n,!0)):d===27?pt(s,X,f):(ie=F?x||z||D?!1:d===46||d===68&&A:A||z||D?!1:d===46,ie?d===46?pt(s,oe,f):(f.preventDefault(),pt(s,n,!1)):d===8&&(F?z:A)?(f.preventDefault(),pt(s,u,!0)):d===46&&(F?z:A)?(f.preventDefault(),pt(s,u,!1)):F&&D&&d===8?(f.preventDefault(),pt(s,p,!0)):F&&D&&d===46?(f.preventDefault(),pt(s,p,!1)):d===66&&!z&&(F?D:A)?(f.preventDefault(),pt(s,g,"bold")):d===85&&!z&&(F?D:A)?(f.preventDefault(),pt(s,g,"underline")):d===73&&!z&&(F?D:A)?(f.preventDefault(),pt(s,g,"italic")):d!==9||z||A||D?d===90&&!x&&(F?D:A)?(f.preventDefault(),pt(s,_,void 0)):(ie=F?d===90&&D&&x:d===89&&A||d===90&&A&&x,ie?(f.preventDefault(),pt(s,C,void 0)):ri(s._editorState._selection)?(ie=x?!1:d===67?F?D:A:!1,ie?(f.preventDefault(),pt(s,te,f)):(ie=x?!1:d===88?F?D:A:!1,ie?(f.preventDefault(),pt(s,fe,f)):d===65&&(F?D:A)&&(f.preventDefault(),pt(s,V,f)))):!w&&d===65&&(F?D:A)&&(f.preventDefault(),pt(s,V,f))):pt(s,Z,f))}else Za=!1,pt(s,P,f);else pt(s,k,f);else pt(s,R,f);else pt(s,O,f);else pt(s,T,f);else pt(s,v,f);else pt(s,y,f);(A||x||z||D)&&pt(s,ne,f)}}}function ad(f){let s=f.__lexicalEventHandles;return s===void 0&&(s=[],f.__lexicalEventHandles=s),s}let sa=new Map;function sd(f){f=f.target;let s=ho(f==null?null:f.nodeType===9?f.defaultView:f.ownerDocument.defaultView);if(s!==null){var d=wt(s.anchorNode);if(d!==null){kc&&(kc=!1,Pr(d,()=>{var z=oi(),ie=s.anchorNode;ie!==null&&(ie=ie.nodeType,ie===1||ie===3)&&(z=Mi(z,s,d),br(z))})),f=Ee(d),f=f[f.length-1];var x=f._key,A=sa.get(x),D=A||f;D!==d&&od(s,D,!1),od(s,d,!0),d!==f?sa.set(x,d):A&&sa.delete(x)}}}function yh(f,s){qa===0&&f.ownerDocument.addEventListener("selectionchange",sd),qa++,f.__lexicalEditor=s;let d=ad(f);for(let x=0;x<$c.length;x++){let[A,D]=$c[x],z=typeof D=="function"?ie=>{ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()&&D(ie,s))}:ie=>{if(ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()))switch(A){case"cut":return pt(s,fe,ie);case"copy":return pt(s,te,ie);case"paste":return pt(s,a,ie);case"dragstart":return pt(s,Q,ie);case"dragover":return pt(s,de,ie);case"dragend":return pt(s,pe,ie);case"focus":return pt(s,j,ie);case"blur":return pt(s,ee,ie);case"drop":return pt(s,U,ie)}};f.addEventListener(A,z),d.push(()=>{f.removeEventListener(A,z)})}}function Oi(f,s,d){tr();var x=f.__key;let A=f.getParent();if(A!==null){var D=pn();if(Lt(D)&&nt(f)){var{anchor:z,focus:ie}=D,xe=z.getNode(),Re=ie.getNode();_r(xe,f)&&z.set(f.__key,0,"element"),_r(Re,f)&&ie.set(f.__key,0,"element")}if(xe=D,Re=!1,Lt(xe)&&s){D=xe.anchor;let Ve=xe.focus;D.key===x&&(pa(D,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0),Ve.key===x&&(pa(Ve,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0)}else ri(xe)&&s&&f.isSelected()&&f.selectPrevious();Lt(xe)&&s&&!Re?(x=f.getIndexWithinParent(),yt(f),Pi(xe,A,x,-1)):yt(f),d||Mr(A)||A.canBeEmpty()||!A.isEmpty()||Oi(A,s),s&&Tr(A)&&A.isEmpty()&&A.selectEnd()}}class la{static getType(){B(64,this.name)}static clone(){B(65,this.name)}constructor(s){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,ot(this,s)}getType(){return this.__type}isAttached(){for(var s=this.__key;s!==null;){if(s==="root")return!0;if(s=sn(s),s===null)break;s=s.__parent}return!1}isSelected(s){if(s=s||pn(),s==null)return!1;let d=s.getNodes().some(x=>x.__key===this.__key);return Nt(this)?d:Lt(s)&&s.anchor.type==="element"&&s.focus.type==="element"&&s.anchor.key===s.focus.key&&s.anchor.offset===s.focus.offset?!1:d}getKey(){return this.__key}getIndexWithinParent(){var s=this.getParent();if(s===null)return-1;s=s.getFirstChild();let d=0;for(;s!==null;){if(this.is(s))return d;d++,s=s.getNextSibling()}return-1}getParent(){let s=this.getLatest().__parent;return s===null?null:sn(s)}getParentOrThrow(){let s=this.getParent();return s===null&&B(66,this.__key),s}getTopLevelElement(){let s=this;for(;s!==null;){let d=s.getParent();if(Mr(d))return s;s=d}return null}getTopLevelElementOrThrow(){let s=this.getTopLevelElement();return s===null&&B(67,this.__key),s}getParents(){let s=[],d=this.getParent();for(;d!==null;)s.push(d),d=d.getParent();return s}getParentKeys(){let s=[],d=this.getParent();for(;d!==null;)s.push(d.__key),d=d.getParent();return s}getPreviousSibling(){let s=this.getLatest().__prev;return s===null?null:sn(s)}getPreviousSiblings(){let s=[];var d=this.getParent();if(d===null)return s;for(d=d.getFirstChild();d!==null&&!d.is(this);)s.push(d),d=d.getNextSibling();return s}getNextSibling(){let s=this.getLatest().__next;return s===null?null:sn(s)}getNextSiblings(){let s=[],d=this.getNextSibling();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getCommonAncestor(s){let d=this.getParents();var x=s.getParents();nt(this)&&d.unshift(this),nt(s)&&x.unshift(s),s=d.length;var A=x.length;if(s===0||A===0||d[s-1]!==x[A-1])return null;for(x=new Set(x),A=0;A<s;A++){let D=d[A];if(x.has(D))return D}return null}is(s){return s==null?!1:this.__key===s.__key}isBefore(s){if(this===s)return!1;if(s.isParentOf(this))return!0;if(this.isParentOf(s))return!1;var d=this.getCommonAncestor(s);let x=this;for(;;){var A=x.getParentOrThrow();if(A===d){A=x.getIndexWithinParent();break}x=A}for(x=s;;){if(s=x.getParentOrThrow(),s===d){d=x.getIndexWithinParent();break}x=s}return A<d}isParentOf(s){let d=this.__key;if(d===s.__key)return!1;for(;s!==null;){if(s.__key===d)return!0;s=s.getParent()}return!1}getNodesBetween(s){let d=this.isBefore(s),x=[],A=new Set;for(var D=this;;){var z=D.__key;if(A.has(z)||(A.add(z),x.push(D)),D===s)break;if(z=nt(D)?d?D.getFirstChild():D.getLastChild():null,z!==null)D=z;else if(z=d?D.getNextSibling():D.getPreviousSibling(),z!==null)D=z;else{if(D=D.getParentOrThrow(),A.has(D.__key)||x.push(D),D===s)break;z=D;do z===null&&B(68),D=d?z.getNextSibling():z.getPreviousSibling(),z=z.getParent(),z!==null&&(D!==null||A.has(z.__key)||x.push(z));while(D===null)}}return d||x.reverse(),x}isDirty(){let s=_n()._dirtyLeaves;return s!==null&&s.has(this.__key)}getLatest(){let s=sn(this.__key);return s===null&&B(113),s}getWritable(){tr();var s=Jr(),d=_n();s=s._nodeMap;let x=this.__key,A=this.getLatest(),D=A.__parent;d=d._cloneNotNeeded;var z=pn();return jr(z)&&z.setCachedNodes(null),d.has(x)?(kt(A),A):(z=A.constructor.clone(A),z.__parent=D,z.__next=A.__next,z.__prev=A.__prev,nt(A)&&nt(z)?(z.__first=A.__first,z.__last=A.__last,z.__size=A.__size,z.__indent=A.__indent,z.__format=A.__format,z.__dir=A.__dir):Nt(A)&&Nt(z)&&(z.__format=A.__format,z.__style=A.__style,z.__mode=A.__mode,z.__detail=A.__detail),d.add(x),z.__key=x,kt(z),s.set(x,z),z)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){B(70)}updateDOM(){B(71)}exportDOM(s){return{element:this.createDOM(s._config,s)}}exportJSON(){B(72)}static importJSON(){B(18,this.name)}static transform(){return null}remove(s){Oi(this,!0,s)}replace(s,d){tr();var x=pn();x!==null&&(x=x.clone()),_c(this,s);let A=this.getLatest(),D=this.__key,z=s.__key,ie=s.getWritable();s=this.getParentOrThrow().getWritable();let xe=s.__size;yt(ie);let Re=A.getPreviousSibling(),Ve=A.getNextSibling(),Ze=A.__prev,Ge=A.__next,Ie=A.__parent;return Oi(A,!1,!0),Re===null?s.__first=z:Re.getWritable().__next=z,ie.__prev=Ze,Ve===null?s.__last=z:Ve.getWritable().__prev=z,ie.__next=Ge,ie.__parent=Ie,s.__size=xe,d&&this.getChildren().forEach(it=>{ie.append(it)}),Lt(x)&&(br(x),d=x.anchor,x=x.focus,d.key===D&&da(d,ie),x.key===D&&da(x,ie)),Kt()===D&&Dt(z),ie}insertAfter(s,d=!0){tr(),_c(this,s);var x=this.getWritable();let A=s.getWritable();var D=A.getParent();let z=pn();var ie=!1,xe=!1;if(D!==null){var Re=s.getIndexWithinParent();yt(A),Lt(z)&&(xe=D.__key,ie=z.anchor,D=z.focus,ie=ie.type==="element"&&ie.key===xe&&ie.offset===Re+1,xe=D.type==="element"&&D.key===xe&&D.offset===Re+1)}D=this.getNextSibling(),Re=this.getParentOrThrow().getWritable();let Ve=A.__key,Ze=x.__next;return D===null?Re.__last=Ve:D.getWritable().__prev=Ve,Re.__size++,x.__next=Ve,A.__next=Ze,A.__prev=x.__key,A.__parent=x.__parent,d&&Lt(z)&&(d=this.getIndexWithinParent(),Pi(z,Re,d+1),x=Re.__key,ie&&z.anchor.set(x,d+2,"element"),xe&&z.focus.set(x,d+2,"element")),s}insertBefore(s,d=!0){tr(),_c(this,s);var x=this.getWritable();let A=s.getWritable(),D=A.__key;yt(A);let z=this.getPreviousSibling(),ie=this.getParentOrThrow().getWritable(),xe=x.__prev,Re=this.getIndexWithinParent();return z===null?ie.__first=D:z.getWritable().__next=D,ie.__size++,x.__prev=D,A.__prev=xe,A.__next=x.__key,A.__parent=x.__parent,x=pn(),d&&Lt(x)&&(d=this.getParentOrThrow(),Pi(x,d,Re)),s}isParentRequired(){return!1}createParentElementNode(){return yo()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(s,d){tr();let x=this.getPreviousSibling(),A=this.getParentOrThrow();return x===null?A.select(0,0):nt(x)?x.select():Nt(x)?x.select(s,d):(s=x.getIndexWithinParent()+1,A.select(s,s))}selectNext(s,d){tr();let x=this.getNextSibling(),A=this.getParentOrThrow();return x===null?A.select():nt(x)?x.select(0,0):Nt(x)?x.select(s,d):(s=x.getIndexWithinParent(),A.select(s,s))}markDirty(){this.getWritable()}}function Xa(f,s,d){d=d||s.getParentOrThrow().getLastChild();let x=s;for(s=[s];x!==d;){if(!x.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");x=x.getNextSibling(),s.push(x)}for(let A of s)f=f.insertAfter(A)}class ca extends la{static getType(){return"linebreak"}static clone(s){return new ca(s.__key)}constructor(s){super(s)}getTextContent(){return`
|
|
258
|
+
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:s=>{let d=s.parentElement,x,A;return d!==null&&((x=d.firstChild)===s||x.nextSibling===s&&x.nodeType===3&&(x.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((A=d.lastChild)===s||A.previousSibling===s&&A.nodeType===3&&(A.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:Qa,priority:0}}}}static importJSON(){return Ai()}exportJSON(){return{type:"linebreak",version:1}}}function Qa(){return{node:Ai()}}function Ai(){return Xo(new ca)}function Ri(f){return f instanceof ca}function $i(f,s){return s&16?"code":s&128?"mark":s&32?"sub":s&64?"sup":null}function es(f,s){return s&1?"strong":s&2?"em":"span"}function Ic(f,s,d,x,A){f=x.classList,x=xt(A,"base"),x!==void 0&&f.add(...x),x=xt(A,"underlineStrikethrough");let D=!1,z=s&8&&s&4;var ie=d&8&&d&4;x!==void 0&&(ie?(D=!0,z||f.add(...x)):z&&f.remove(...x));for(let xe in le)ie=le[xe],x=xt(A,xe),x!==void 0&&(d&ie?!D||xe!=="underline"&&xe!=="strikethrough"?(!(s&ie)||z&&xe==="underline"||xe==="strikethrough")&&f.add(...x):s&ie&&f.remove(...x):s&ie&&f.remove(...x))}function Hs(f,s,d){let x=s.firstChild;if(d=d.isComposing(),f+=d?Ce:"",x==null)s.textContent=f;else if(s=x.nodeValue,s!==f)if(d||w){d=s.length;let A=f.length,D=0,z=0;for(;D<d&&D<A&&s[D]===f[D];)D++;for(;z+D<d&&z+D<A&&s[d-z-1]===f[A-z-1];)z++;f=[D,d-D-z,f.slice(D,A-z)];let[ie,xe,Re]=f;xe!==0&&x.deleteData(ie,xe),x.insertData(ie,Re)}else x.nodeValue=f}function ua(f,s){return s=document.createElement(s),s.appendChild(f),s}class ei extends la{static getType(){return"text"}static clone(s){return new ei(s.__text,s.__key)}constructor(s,d){super(d),this.__text=s,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let s=this.getLatest();return Xe[s.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Kt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(s){return s=le[s],(this.getFormat()&s)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(s,d){let x=this.getLatest().__format;return qe(x,s,d)}createDOM(s){var d=this.__format,x=$i(this,d);let A=es(this,d),D=document.createElement(x===null?A:x),z=D;return this.hasFormat("code")&&D.setAttribute("spellcheck","false"),x!==null&&(z=document.createElement(A),D.appendChild(z)),x=z,Hs(this.__text,x,this),s=s.theme.text,s!==void 0&&Ic(A,0,d,x,s),d=this.__style,d!==""&&(D.style.cssText=d),D}updateDOM(s,d,x){let A=this.__text;var D=s.__format,z=this.__format,ie=$i(this,D);let xe=$i(this,z);var Re=es(this,D);let Ve=es(this,z);return(ie===null?Re:ie)!==(xe===null?Ve:xe)?!0:ie===xe&&Re!==Ve?(D=d.firstChild,D==null&&B(48),s=ie=document.createElement(Ve),Hs(A,s,this),x=x.theme.text,x!==void 0&&Ic(Ve,0,z,s,x),d.replaceChild(ie,D),!1):(Re=d,xe!==null&&ie!==null&&(Re=d.firstChild,Re==null&&B(49)),Hs(A,Re,this),x=x.theme.text,x!==void 0&&D!==z&&Ic(Ve,D,z,Re,x),z=this.__style,s.__style!==z&&(d.style.cssText=z),!1)}static importDOM(){return{"#text":()=>({conversion:Ks,priority:0}),b:()=>({conversion:Gs,priority:0}),code:()=>({conversion:ti,priority:0}),em:()=>({conversion:ti,priority:0}),i:()=>({conversion:ti,priority:0}),s:()=>({conversion:ti,priority:0}),span:()=>({conversion:mt,priority:0}),strong:()=>({conversion:ti,priority:0}),sub:()=>({conversion:ti,priority:0}),sup:()=>({conversion:ti,priority:0}),u:()=>({conversion:ti,priority:0})}}static importJSON(s){let d=Fn(s.text);return d.setFormat(s.format),d.setDetail(s.detail),d.setMode(s.mode),d.setStyle(s.style),d}exportDOM(s){return{element:s}=super.exportDOM(s),s!==null&&Qo(s)||B(132),s.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(s=ua(s,"b")),this.hasFormat("italic")&&(s=ua(s,"i")),this.hasFormat("strikethrough")&&(s=ua(s,"s")),this.hasFormat("underline")&&(s=ua(s,"u")),{element:s}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(s){let d=this.getWritable();return d.__format=typeof s=="string"?le[s]:s,d}setDetail(s){let d=this.getWritable();return d.__detail=typeof s=="string"?ve[s]:s,d}setStyle(s){let d=this.getWritable();return d.__style=s,d}toggleFormat(s){let d=this.getFormat();return s=qe(d,s,null),this.setFormat(s)}toggleDirectionless(){let s=this.getWritable();return s.__detail^=1,s}toggleUnmergeable(){let s=this.getWritable();return s.__detail^=2,s}setMode(s){if(s=We[s],this.__mode===s)return this;let d=this.getWritable();return d.__mode=s,d}setTextContent(s){if(this.__text===s)return this;let d=this.getWritable();return d.__text=s,d}select(s,d){tr();let x=pn();var A=this.getTextContent();let D=this.__key;if(typeof A=="string"?(A=A.length,s===void 0&&(s=A),d===void 0&&(d=A)):d=s=0,Lt(x))A=Kt(),A!==x.anchor.key&&A!==x.focus.key||Dt(D),x.setTextNodeRange(this,s,this,d);else return po(D,s,D,d,"text","text");return x}selectStart(){return this.select(0,0)}selectEnd(){let s=this.getTextContentSize();return this.select(s,s)}spliceText(s,d,x,A){let D=this.getWritable(),z=D.__text,ie=x.length,xe=s;0>xe&&(xe=ie+xe,0>xe&&(xe=0));let Re=pn();return A&&Lt(Re)&&(s+=ie,Re.setTextNodeRange(D,s,D,s)),d=z.slice(0,xe)+x+z.slice(xe+d),D.__text=d,D}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...s){tr();var d=this.getLatest(),x=d.getTextContent(),A=d.__key,D=Kt(),z=new Set(s);s=[];for(var ie=x.length,xe="",Re=0;Re<ie;Re++)xe!==""&&z.has(Re)&&(s.push(xe),xe=""),xe+=x[Re];if(xe!==""&&s.push(xe),z=s.length,z===0)return[];if(s[0]===x)return[d];var Ve=s[0];x=d.getParentOrThrow(),Re=d.getFormat();let Ze=d.getStyle(),Ge=d.__detail;ie=!1,d.isSegmented()?(xe=Fn(Ve),xe.__format=Re,xe.__style=Ze,xe.__detail=Ge,ie=!0):(xe=d.getWritable(),xe.__text=Ve),d=pn(),xe=[xe],Ve=Ve.length;for(let vt=1;vt<z;vt++){var Ie=s[vt],it=Ie.length;Ie=Fn(Ie).getWritable(),Ie.__format=Re,Ie.__style=Ze,Ie.__detail=Ge;let $t=Ie.__key;if(it=Ve+it,Lt(d)){let Vt=d.anchor,Rn=d.focus;Vt.key===A&&Vt.type==="text"&&Vt.offset>Ve&&Vt.offset<=it&&(Vt.key=$t,Vt.offset-=Ve,d.dirty=!0),Rn.key===A&&Rn.type==="text"&&Rn.offset>Ve&&Rn.offset<=it&&(Rn.key=$t,Rn.offset-=Ve,d.dirty=!0)}D===A&&Dt($t),Ve=it,xe.push(Ie)}return A=this.getPreviousSibling(),D=this.getNextSibling(),A!==null&&kt(A),D!==null&&kt(D),A=x.getWritable(),D=this.getIndexWithinParent(),ie?(A.splice(D,0,xe),this.remove()):A.splice(D,1,xe),Lt(d)&&Pi(d,x,D,z-1),xe}mergeWithSibling(s){var d=s===this.getPreviousSibling();d||s===this.getNextSibling()||B(50);var x=this.__key;let A=s.__key,D=this.__text,z=D.length;Kt()===A&&Dt(x);let ie=pn();if(Lt(ie)){let xe=ie.anchor,Re=ie.focus;xe!==null&&xe.key===A&&(ii(xe,d,x,s,z),ie.dirty=!0),Re!==null&&Re.key===A&&(ii(Re,d,x,s,z),ie.dirty=!0)}return x=s.__text,this.setTextContent(d?x+D:D+x),d=this.getWritable(),s.remove(),d}isTextEntity(){return!1}}function mt(f){let s=f.style.fontWeight==="700",d=f.style.textDecoration==="line-through",x=f.style.fontStyle==="italic",A=f.style.textDecoration==="underline",D=f.style.verticalAlign;return{forChild:z=>(Nt(z)&&(s&&z.toggleFormat("bold"),d&&z.toggleFormat("strikethrough"),x&&z.toggleFormat("italic"),A&&z.toggleFormat("underline"),D==="sub"&&z.toggleFormat("subscript"),D==="super"&&z.toggleFormat("superscript")),z),node:null}}function Gs(f){let s=f.style.fontWeight==="normal";return{forChild:d=>(Nt(d)&&!s&&d.toggleFormat("bold"),d),node:null}}let ts=new WeakMap;function Ks(f){f.parentElement===null&&B(129);for(var s=f.textContent||"",d,x=f.parentNode,A=[f];x!==null&&(d=ts.get(x))===void 0&&!(x.nodeName==="PRE"||x.nodeType===1&&x.style!==void 0&&x.style.whiteSpace!==void 0&&x.style.whiteSpace.startsWith("pre"));)A.push(x),x=x.parentNode;for(d=d===void 0?x:d,x=0;x<A.length;x++)ts.set(A[x],d);if(d!==null){for(s=s.split(/(\r?\n|\t)/),f=[],A=s.length,d=0;d<A;d++)x=s[d],x===`
|
|
259
|
+
`||x===`\r
|
|
260
|
+
`?f.push(Ai()):x===" "?f.push(Us()):x!==""&&f.push(Fn(x));return{node:f}}if(s=s.replace(/\r/g,"").replace(/[ \t\n]+/g," "),s==="")return{node:null};if(s[0]===" "){for(A=f,d=!0;A!==null&&(A=ld(A,!1))!==null;)if(x=A.textContent||"",0<x.length){/[ \t\n]$/.test(x)&&(s=s.slice(1)),d=!1;break}d&&(s=s.slice(1))}if(s[s.length-1]===" "){for(A=!0;f!==null&&(f=ld(f,!0))!==null;)if(0<(f.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){A=!1;break}A&&(s=s.slice(0,s.length-1))}return s===""?{node:null}:{node:Fn(s)}}let vh=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function ld(f,s){for(;;){for(var d=void 0;(d=s?f.nextSibling:f.previousSibling)===null;)if(f=f.parentElement,f===null)return null;if(f=d,f.nodeType===1&&(d=f.style.display,d===""&&f.nodeName.match(vh)===null||d!==""&&!d.startsWith("inline")))return null;for(;(d=s?f.firstChild:f.lastChild)!==null;)f=d;if(f.nodeType===3)return f;if(f.nodeName==="BR")return null}}let bh={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ti(f){let s=bh[f.nodeName.toLowerCase()];return s===void 0?{node:null}:{forChild:d=>(Nt(d)&&!d.hasFormat(s)&&d.toggleFormat(s),d),node:null}}function Fn(f=""){return Xo(new ei(f))}function Nt(f){return f instanceof ei}class Oo extends ei{static getType(){return"tab"}static clone(s){let d=new Oo(s.__key);return d.__text=s.__text,d.__format=s.__format,d.__style=s.__style,d}constructor(s){super(" ",s),this.__detail=2}static importDOM(){return null}static importJSON(s){let d=Us();return d.setFormat(s.format),d.setStyle(s.style),d}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){B(126)}setDetail(){B(127)}setMode(){B(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Us(){return Xo(new Oo)}function Lc(f){return f instanceof Oo}class er{constructor(s,d,x){this._selection=null,this.key=s,this.offset=d,this.type=x}is(s){return this.key===s.key&&this.offset===s.offset&&this.type===s.type}isBefore(s){let d=this.getNode(),x=s.getNode(),A=this.offset;if(s=s.offset,nt(d)){var D=d.getDescendantByIndex(A);d=D??d}return nt(x)&&(D=x.getDescendantByIndex(s),x=D??x),d===x?A<s:d.isBefore(x)}getNode(){let s=sn(this.key);return s===null&&B(20),s}set(s,d,x){let A=this._selection,D=this.key;this.key=s,this.offset=d,this.type=x,ma()||(Kt()===D&&Dt(s),A!==null&&(A.setCachedNodes(null),A.dirty=!0))}}function Vs(f,s){let d=s.__key,x=f.offset,A="element";if(Nt(s))A="text",s=s.getTextContentSize(),x>s&&(x=s);else if(!nt(s)){var D=s.getNextSibling();Nt(D)?(d=D.__key,x=0,A="text"):(D=s.getParent())&&(d=D.__key,x=s.getIndexWithinParent()+1)}f.set(d,x,A)}function da(f,s){if(nt(s)){let d=s.getLastDescendant();nt(d)||Nt(d)?Vs(f,d):Vs(f,s)}else Vs(f,s)}function Ys(f,s,d,x){let A=f.getNode(),D=A.getChildAtIndex(f.offset),z=Fn(),ie=Tr(A)?yo().append(z):z;z.setFormat(d),z.setStyle(x),D===null?A.append(ie):D.insertBefore(ie),f.is(s)&&s.set(z.__key,0,"text"),f.set(z.__key,0,"text")}function ni(f,s,d,x){f.key=s,f.offset=d,f.type=x}class ns{constructor(s,d){this.anchor=s,this.focus=d,s._selection=this,d._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return jr(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return rs(this)}}class fa{constructor(s){this.dirty=!1,this._nodes=s,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){if(!ri(s))return!1;let d=this._nodes,x=s._nodes;return d.size===x.size&&Array.from(d).every(A=>x.has(A))}add(s){this.dirty=!0,this._nodes.add(s),this._cachedNodes=null}delete(s){this.dirty=!0,this._nodes.delete(s),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(s){return this._nodes.has(s)}clone(){return new fa(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.getNodes(),x=d.length;var A=d[x-1];if(Nt(A))A=A.select();else{let D=A.getIndexWithinParent()+1;A=A.getParentOrThrow().select(D,D)}for(A.insertNodes(s),s=0;s<x;s++)d[s].remove()}getNodes(){var s=this._cachedNodes;if(s!==null)return s;var d=this._nodes;s=[];for(let x of d)d=sn(x),d!==null&&s.push(d);return ma()||(this._cachedNodes=s),s}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function Lt(f){return f instanceof ki}function jr(f){return f instanceof ns}function Fc(f){let[s,,d]=qs(f);f=d.getChildren();let x=f.length;var A=f[0].getChildren().length;let D=Array(x);for(var z=0;z<x;z++)D[z]=Array(A);for(A=0;A<x;A++){z=f[A].getChildren();let ie=0;for(let xe=0;xe<z.length;xe++){for(;D[A][ie];)ie++;let Re=z[xe],Ve=Re.__rowSpan||1,Ze=Re.__colSpan||1;for(let Ge=0;Ge<Ve;Ge++)for(let Ie=0;Ie<Ze;Ie++)D[A+Ge][ie+Ie]=Re;if(s===Re)return{colSpan:Ze,columnIndex:ie,rowIndex:A,rowSpan:Ve};ie+=Ze}}return null}class Di extends ns{constructor(s,d,x){super(d,x),this.gridKey=s}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return cd(s)?this.gridKey===s.gridKey&&this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}set(s,d,x){this.dirty=!0,this.gridKey=s,this.anchor.key=d,this.focus.key=x,this._cachedNodes=null}clone(){return new Di(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.focus.getNode();ut(d.select(0,d.getChildrenSize())).insertNodes(s)}getShape(){var s=sn(this.anchor.key);if(Br(s)||B(103),s=Fc(s),s===null)throw Error("getCellRect: expected to find AnchorNode");var d=sn(this.focus.key);Br(d)||B(104);let x=Fc(d);if(x===null)throw Error("getCellRect: expected to find focusCellNode");d=Math.min(s.columnIndex,x.columnIndex);let A=Math.max(s.columnIndex,x.columnIndex),D=Math.min(s.rowIndex,x.rowIndex);return s=Math.max(s.rowIndex,x.rowIndex),{fromX:Math.min(d,A),fromY:Math.min(D,s),toX:Math.max(d,A),toY:Math.max(D,s)}}getNodes(){function s($t){let{cell:Vt,startColumn:Rn,startRow:Jn}=$t;Re=Math.min(Re,Rn),Ve=Math.min(Ve,Jn),Ze=Math.max(Ze,Rn+Vt.__colSpan-1),Ge=Math.max(Ge,Jn+Vt.__rowSpan-1)}var d=this._cachedNodes;if(d!==null)return d;var x=this.anchor.getNode();d=this.focus.getNode();var A=Is(x,Br);x=Is(d,Br),Br(A)||B(103),Br(x)||B(104),d=A.getParent(),ls(d)||B(105),d=d.getParent(),Uc(d)||B(106);var D=x.getParents()[1];if(D!==d){if(d.isParentOf(x)){if(d=D.getParent(),d==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,x.getKey(),d.getKey())}else{if(d=d.getParent(),d==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,d.getKey(),x.getKey())}return this.getNodes()}let[z,ie,xe]=Ao(d,A,x),Re=Math.min(ie.startColumn,xe.startColumn),Ve=Math.min(ie.startRow,xe.startRow),Ze=Math.max(ie.startColumn+ie.cell.__colSpan-1,xe.startColumn+xe.cell.__colSpan-1),Ge=Math.max(ie.startRow+ie.cell.__rowSpan-1,xe.startRow+xe.cell.__rowSpan-1);x=Re,A=Ve,D=Re;for(var Ie=Ve;Re<x||Ve<A||Ze>D||Ge>Ie;){if(Re<x){var it=Ie-A;--x;for(var vt=0;vt<=it;vt++)s(z[A+vt][x])}if(Ve<A)for(it=D-x,--A,vt=0;vt<=it;vt++)s(z[A][x+vt]);if(Ze>D)for(it=Ie-A,D+=1,vt=0;vt<=it;vt++)s(z[A+vt][D]);if(Ge>Ie)for(it=D-x,Ie+=1,vt=0;vt<=it;vt++)s(z[Ie][x+vt])}for(d=[d],x=null,A=Ve;A<=Ge;A++)for(D=Re;D<=Ze;D++)({cell:Ie}=z[A][D]),it=Ie.getParent(),ls(it)||B(107),it!==x&&d.push(it),d.push(Ie,...Cc(Ie)),x=it;return ma()||(this._cachedNodes=d),d}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function cd(f){return f instanceof Di}class ki extends ns{constructor(s,d,x,A){super(s,d),this.format=x,this.style=A}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return Lt(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus)&&this.format===s.format&&this.style===s.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var s=this._cachedNodes;if(s!==null)return s;s=this.anchor;var d=this.focus,x=s.isBefore(d),A=x?s:d;x=x?d:s,s=A.getNode(),d=x.getNode();let D=A.offset;return A=x.offset,nt(s)&&(x=s.getDescendantByIndex(D),s=x??s),nt(d)&&(x=d.getDescendantByIndex(A),x!==null&&x!==s&&d.getChildAtIndex(A)===x&&(x=x.getPreviousSibling()),d=x??d),s=s.is(d)?nt(s)&&0<s.getChildrenSize()?[]:[s]:s.getNodesBetween(d),ma()||(this._cachedNodes=s),s}setTextNodeRange(s,d,x,A){ni(this.anchor,s.__key,d,"text"),ni(this.focus,x.__key,A,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let s=this.getNodes();if(s.length===0)return"";let d=s[0],x=s[s.length-1],A=this.anchor,D=this.focus,z=A.isBefore(D),[ie,xe]=rs(this),Re="",Ve=!0;for(let Ze=0;Ze<s.length;Ze++){let Ge=s[Ze];if(nt(Ge)&&!Ge.isInline())Ve||(Re+=`
|
|
261
|
+
`),Ve=!Ge.isEmpty();else if(Ve=!1,Nt(Ge)){let Ie=Ge.getTextContent();Ge===d?Ge===x?(A.type!=="element"||D.type!=="element"||D.offset===A.offset)&&(Ie=ie<xe?Ie.slice(ie,xe):Ie.slice(xe,ie)):Ie=z?Ie.slice(ie):Ie.slice(xe):Ge===x&&(Ie=z?Ie.slice(0,xe):Ie.slice(0,ie)),Re+=Ie}else!on(Ge)&&!Ri(Ge)||Ge===x&&this.isCollapsed()||(Re+=Ge.getTextContent())}return Re}applyDOMRange(s){let d=_n(),x=d.getEditorState()._selection;if(s=pr(s.startContainer,s.startOffset,s.endContainer,s.endOffset,d,x),s!==null){var[A,D]=s;ni(this.anchor,A.key,A.offset,A.type),ni(this.focus,D.key,D.offset,D.type),this._cachedNodes=null}}clone(){let s=this.anchor,d=this.focus;return new ki(new er(s.key,s.offset,s.type),new er(d.key,d.offset,d.type),this.format,this.style)}toggleFormat(s){this.format=qe(this.format,s,null),this.dirty=!0}setStyle(s){this.style=s,this.dirty=!0}hasFormat(s){return(this.format&le[s])!==0}insertRawText(s){s=s.split(/(\r?\n|\t)/);let d=[],x=s.length;for(let A=0;A<x;A++){let D=s[A];D===`
|
|
262
|
+
`||D===`\r
|
|
263
|
+
`?d.push(Ai()):D===" "?d.push(Us()):d.push(Fn(D))}this.insertNodes(d)}insertText(s){var d=this.anchor,x=this.focus,A=this.isCollapsed()||d.isBefore(x),D=this.format,z=this.style;A&&d.type==="element"?Ys(d,x,D,z):A||x.type!=="element"||Ys(x,d,D,z);var ie=this.getNodes(),xe=ie.length,Re=A?x:d;x=(A?d:x).offset;var Ve=Re.offset;d=ie[0],Nt(d)||B(26),A=d.getTextContent().length;var Ze=d.getParentOrThrow(),Ge=ie[xe-1];if(this.isCollapsed()&&x===A&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!Ze.canInsertTextAfter()&&d.getNextSibling()===null)){var Ie=d.getNextSibling();if(Nt(Ie)&&Ie.canInsertTextBefore()&&!_t(Ie)||(Ie=Fn(),Ie.setFormat(D),Ze.canInsertTextAfter()?d.insertAfter(Ie):Ze.insertAfter(Ie)),Ie.select(0,0),d=Ie,s!==""){this.insertText(s);return}}else if(this.isCollapsed()&&x===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!Ze.canInsertTextBefore()&&d.getPreviousSibling()===null)){if(Ie=d.getPreviousSibling(),(!Nt(Ie)||_t(Ie))&&(Ie=Fn(),Ie.setFormat(D),Ze.canInsertTextBefore()?d.insertBefore(Ie):Ze.insertBefore(Ie)),Ie.select(),d=Ie,s!==""){this.insertText(s);return}}else if(d.isSegmented()&&x!==A)Ze=Fn(d.getTextContent()),Ze.setFormat(D),d.replace(Ze),d=Ze;else if(!(this.isCollapsed()||s===""||(Ie=Ge.getParent(),Ze.canInsertTextBefore()&&Ze.canInsertTextAfter()&&(!nt(Ie)||Ie.canInsertTextBefore()&&Ie.canInsertTextAfter())))){this.insertText(""),jn(this.anchor,this.focus,null),this.insertText(s);return}if(xe===1)if(d.isToken())s=Fn(s),s.select(),d.replace(s);else{if(ie=d.getFormat(),xe=d.getStyle(),x===Ve&&(ie!==D||xe!==z))if(d.getTextContent()==="")d.setFormat(D),d.setStyle(z);else{ie=Fn(s),ie.setFormat(D),ie.setStyle(z),ie.select(),x===0?d.insertBefore(ie,!1):([xe]=d.splitText(x),xe.insertAfter(ie,!1)),ie.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length);return}else if(Lc(d)){s=Fn(s),s.setFormat(D),s.setStyle(z),s.select(),d.replace(s);return}d=d.spliceText(x,Ve-x,s,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=s.length:(this.format=ie,this.style=xe))}else{if(D=new Set([...d.getParentKeys(),...Ge.getParentKeys()]),Ie=nt(d)?d:d.getParentOrThrow(),z=nt(Ge)?Ge:Ge.getParentOrThrow(),Ze=Ge,!Ie.is(z)&&z.isInline())do Ze=z,z=z.getParentOrThrow();while(z.isInline());if(Re.type==="text"&&(Ve!==0||Ge.getTextContent()==="")||Re.type==="element"&&Ge.getIndexWithinParent()<Ve)if(Nt(Ge)&&!Ge.isToken()&&Ve!==Ge.getTextContentSize()){if(Ge.isSegmented()){var it=Fn(Ge.getTextContent());Ge.replace(it),Ge=it}Tr(Re.getNode())||Re.type!=="text"||(Ge=Ge.spliceText(0,Ve,"")),D.add(Ge.__key)}else Re=Ge.getParentOrThrow(),Re.canBeEmpty()||Re.getChildrenSize()!==1?Ge.remove():Re.remove();else D.add(Ge.__key);for(Re=z.getChildren(),Ve=new Set(ie),Ge=Ie.is(z),Ie=Ie.isInline()&&d.getNextSibling()===null?Ie:d,it=Re.length-1;0<=it;it--){let vt=Re[it];if(vt.is(d)||nt(vt)&&vt.isParentOf(d))break;vt.isAttached()&&(!Ve.has(vt)||vt.is(Ze)?Ge||Ie.insertAfter(vt,!1):vt.remove())}if(!Ge)for(Re=z,z=null;Re!==null;)Ve=Re.getChildren(),Ge=Ve.length,(Ge===0||Ve[Ge-1].is(z))&&(D.delete(Re.__key),z=Re),Re=Re.getParent();for(d.isToken()?x===A?d.select():(s=Fn(s),s.select(),d.replace(s)):(d=d.spliceText(x,A-x,s,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length)),s=1;s<xe;s++)d=ie[s],D.has(d.__key)||d.remove()}}removeText(){this.insertText("")}formatText(s){if(this.isCollapsed())this.toggleFormat(s),Dt(null);else{var d=this.getNodes(),x=[];for(var A of d)Nt(A)&&x.push(A);var D=x.length;if(D===0)this.toggleFormat(s),Dt(null);else{A=this.anchor;var z=this.focus,ie=this.isBackward();d=ie?z:A,A=ie?A:z;var xe=0,Re=x[0];if(z=d.type==="element"?0:d.offset,d.type==="text"&&z===Re.getTextContentSize()&&(xe=1,Re=x[1],z=0),Re!=null){ie=Re.getFormatFlags(s,null);var Ve=D-1,Ze=x[Ve];if(D=A.type==="text"?A.offset:Ze.getTextContentSize(),Re.is(Ze))z!==D&&(z===0&&D===Re.getTextContentSize()?Re.setFormat(ie):(s=Re.splitText(z,D),s=z===0?s[0]:s[1],s.setFormat(ie),d.type==="text"&&d.set(s.__key,0,"text"),A.type==="text"&&A.set(s.__key,D-z,"text")),this.format=ie);else{z!==0&&([,Re]=Re.splitText(z),z=0),Re.setFormat(ie);var Ge=Ze.getFormatFlags(s,ie);for(0<D&&(D!==Ze.getTextContentSize()&&([Ze]=Ze.splitText(D)),Ze.setFormat(Ge)),xe+=1;xe<Ve;xe++){let Ie=x[xe];if(!Ie.isToken()){let it=Ie.getFormatFlags(s,Ge);Ie.setFormat(it)}}d.type==="text"&&d.set(Re.__key,z,"text"),A.type==="text"&&A.set(Ze.__key,D,"text"),this.format=ie|Ge}}}}}insertNodes(s){if(s.length!==0){if(this.anchor.key==="root"){this.insertParagraph();var d=pn();if(!Lt(d))throw Error("Expected RangeSelection after insertParagraph");return d.insertNodes(s)}var x=wc(this.anchor.getNode(),Ti);if(d=s[s.length-1],"__language"in x)if("__language"in s[0])this.insertText(s[0].getTextContent());else{var A=Ii(this);x.splice(A,0,s),d.selectEnd()}else if(s.some(ie=>(nt(ie)||on(ie))&&!ie.isInline())){d=Zs(s),s=d.getLastDescendant();var D=d.getChildren();d=nt(x)&&x.isEmpty()?null:this.insertParagraph(),A=D[D.length-1];var z=D[0];(ie=>nt(ie)&&Ti(ie)&&!ie.isEmpty()&&nt(x)&&(!x.isEmpty()||"__value"in x&&"__checked"in x))(z)&&(x.append(...z.getChildren()),z=D[1]),z&&Xa(x,z),D=wc(s,Ti),d&&nt(D)&&("__value"in d&&"__checked"in d||Ti(A))&&(D.append(...d.getChildren()),d.remove()),nt(x)&&x.isEmpty()&&x.remove(),s.selectEnd(),s=nt(x)?x.getLastChild():null,Ri(s)&&D!==x&&s.remove()}else A=Ii(this),x.splice(A,0,s),d.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var s=yo();return qn().splice(this.anchor.offset,0,[s]),s.select(),s}var d=Ii(this);return s=wc(this.anchor.getNode(),Ti),d=(d=s.getChildAtIndex(d))?[d,...d.getNextSiblings()]:[],(s=s.insertNewAfter(this,!1))?(s.append(...d),s.selectStart(),s):null}insertLineBreak(s){var d=Ai();this.insertNodes([d]),s&&(s=d.getParentOrThrow(),d=d.getIndexWithinParent(),s.select(d,d))}extract(){var s=this.getNodes(),d=s.length,x=d-1,A=this.anchor;let D=this.focus;var z=s[0];let ie=s[x],[xe,Re]=rs(this);return d===0?[]:d===1?Nt(z)&&!this.isCollapsed()?(s=xe>Re?Re:xe,x=z.splitText(s,xe>Re?xe:Re),s=s===0?x[0]:x[1],s!=null?[s]:[]):[z]:(d=A.isBefore(D),Nt(z)&&(A=d?xe:Re,A===z.getTextContentSize()?s.shift():A!==0&&([,z]=z.splitText(A),s[0]=z)),Nt(ie)&&(z=ie.getTextContent().length,d=d?Re:xe,d===0?s.pop():d!==z&&([ie]=ie.splitText(d),s[x]=ie)),s)}modify(s,d,x){var A=this.focus,D=this.anchor,z=s==="move",ie=At(A,d);if(on(ie)&&!ie.isIsolated())z&&ie.isKeyboardSelectable()?(d=go(),d.add(ie.__key),br(d)):(s=d?ie.getPreviousSibling():ie.getNextSibling(),Nt(s)?(ie=s.__key,d=d?s.getTextContent().length:0,A.set(ie,d,"text"),z&&D.set(ie,d,"text")):(x=ie.getParentOrThrow(),nt(s)?(x=s.__key,ie=d?s.getChildrenSize():0):(ie=ie.getIndexWithinParent(),x=x.__key,d||ie++),A.set(x,ie,"element"),z&&D.set(x,ie,"element")));else if(D=_n(),A=ho(D._window)){var xe=D._blockCursorElement,Re=D._rootElement;if(Re===null||xe===null||!nt(ie)||ie.isInline()||ie.canBeEmpty()||Ec(xe,D,Re),A.modify(s,d?"backward":"forward",x),0<A.rangeCount&&(ie=A.getRangeAt(0),D=this.anchor.getNode(),D=Tr(D)?D:Zn(D),this.applyDOMRange(ie),this.dirty=!0,!z)){for(z=this.getNodes(),s=[],x=!1,xe=0;xe<z.length;xe++)Re=z[xe],_r(Re,D)?s.push(Re):x=!0;x&&0<s.length&&(d?(d=s[0],nt(d)?d.selectStart():d.getParentOrThrow().selectStart()):(d=s[s.length-1],nt(d)?d.selectEnd():d.getParentOrThrow().selectEnd())),(A.anchorNode!==ie.startContainer||A.anchorOffset!==ie.startOffset)&&(d=this.focus,z=this.anchor,A=z.key,ie=z.offset,D=z.type,ni(z,d.key,d.offset,d.type),ni(d,A,ie,D),this._cachedNodes=null)}}}deleteCharacter(s){let d=this.isCollapsed();if(this.isCollapsed()){var x=this.anchor,A=this.focus,D=x.getNode();if(!s&&(x.type==="element"&&nt(D)&&x.offset===D.getChildrenSize()||x.type==="text"&&x.offset===D.getTextContentSize())){var z=D.getParent();if(z=D.getNextSibling()||(z===null?null:z.getNextSibling()),nt(z)&&z.isShadowRoot())return}if(z=At(A,s),on(z)&&!z.isIsolated()){z.isKeyboardSelectable()&&nt(D)&&D.getChildrenSize()===0?(D.remove(),s=go(),s.add(z.__key),br(s)):(z.remove(),_n().dispatchCommand(e,void 0));return}if(!s&&nt(z)&&nt(D)&&D.isEmpty()){D.remove(),z.selectStart();return}if(this.modify("extend",s,"character"),this.isCollapsed()){if(s&&x.offset===0&&(x.type==="element"?x.getNode():x.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(z=A.type==="text"?A.getNode():null,D=x.type==="text"?x.getNode():null,z!==null&&z.isSegmented()){if(x=A.offset,A=z.getTextContentSize(),z.is(D)||s&&x!==A||!s&&x!==0){ud(z,s,x);return}}else if(D!==null&&D.isSegmented()&&(x=x.offset,A=D.getTextContentSize(),D.is(z)||s&&x!==0||!s&&x!==A)){ud(D,s,x);return}if(D=this.anchor,z=this.focus,x=D.getNode(),A=z.getNode(),x===A&&D.type==="text"&&z.type==="text"){var ie=D.offset,xe=z.offset;let Re=ie<xe;A=Re?ie:xe,xe=Re?xe:ie,ie=xe-1,A!==ie&&(x=x.getTextContent().slice(A,xe),oa(x)||(s?z.offset=ie:D.offset=ie))}}}this.removeText(),s&&!d&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(s=this.anchor.getNode(),s.isEmpty()&&Tr(s.getParent())&&s.getIndexWithinParent()===0&&s.collapseAtStart(this))}deleteLine(s){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",s,"lineboundary"),(s?this.focus:this.anchor).offset===0&&this.modify("extend",s,"character")),this.removeText()}deleteWord(s){this.isCollapsed()&&this.modify("extend",s,"word"),this.removeText()}}function ri(f){return f instanceof fa}function ha(f){let s=f.offset;return f.type==="text"?s:(f=f.getNode(),s===f.getChildrenSize()?f.getTextContent().length:0)}function rs(f){let s=f.anchor;return f=f.focus,s.type==="element"&&f.type==="element"&&s.key===f.key&&s.offset===f.offset?[0,0]:[ha(s),ha(f)]}function ud(f,s,d){let x=f.getTextContent().split(/(?=\s)/g),A=x.length,D=0,z=0;for(let ie=0;ie<A;ie++){let xe=x[ie],Re=ie===A-1;if(z=D,D+=xe.length,s&&D===d||D>d||Re){x.splice(ie,1),Re&&(z=void 0);break}}s=x.join("").trim(),s===""?f.remove():(f.setTextContent(s),f.select(z,z))}function jc(f,s,d,x){var A=s;if(f.nodeType===1){let ie=!1;var D=f.childNodes,z=D.length;A===z&&(ie=!0,A=z-1);let xe=D[A];if(z=!1,xe===x._blockCursorElement?(xe=D[A+1],z=!0):x._blockCursorElement!==null&&A--,x=fo(xe),Nt(x))A=ie?x.getTextContentSize():0;else{if(D=fo(f),D===null)return null;if(nt(D)?(f=D.getChildAtIndex(A),(s=nt(f))&&(s=f.getParent(),s=d===null||s===null||!s.canBeEmpty()||s!==d.getNode()),s&&(d=ie?f.getLastDescendant():f.getFirstDescendant(),d===null?(D=f,A=0):(f=d,D=nt(f)?f:f.getParentOrThrow())),Nt(f)?(x=f,D=null,A=ie?f.getTextContentSize():0):f!==D&&ie&&!z&&A++):(A=D.getIndexWithinParent(),A=s===0&&on(D)&&fo(f)===D?A:A+1,D=D.getParentOrThrow()),nt(D))return new er(D.__key,A,"element")}}else x=fo(f);return Nt(x)?new er(x.__key,A,"text"):null}function dd(f,s,d){var x=f.offset,A=f.getNode();x===0?(x=A.getPreviousSibling(),A=A.getParent(),s?(d||!s)&&x===null&&nt(A)&&A.isInline()&&(s=A.getPreviousSibling(),Nt(s)&&(f.key=s.__key,f.offset=s.getTextContent().length)):nt(x)&&!d&&x.isInline()?(f.key=x.__key,f.offset=x.getChildrenSize(),f.type="element"):Nt(x)&&(f.key=x.__key,f.offset=x.getTextContent().length)):x===A.getTextContent().length&&(x=A.getNextSibling(),A=A.getParent(),s&&nt(x)&&x.isInline()?(f.key=x.__key,f.offset=0,f.type="element"):(d||s)&&x===null&&nt(A)&&A.isInline()&&!A.canInsertTextAfter()&&(s=A.getNextSibling(),Nt(s)&&(f.key=s.__key,f.offset=0)))}function jn(f,s,d){if(f.type==="text"&&s.type==="text"){var x=f.isBefore(s);let A=f.is(s);dd(f,x,A),dd(s,!x,A),A&&(s.key=f.key,s.offset=f.offset,s.type=f.type),x=_n(),x.isComposing()&&x._compositionKey!==f.key&&Lt(d)&&(x=d.anchor,d=d.focus,ni(f,x.key,x.offset,x.type),ni(s,d.key,d.offset,d.type))}}function pr(f,s,d,x,A,D){return f===null||d===null||!lt(A,f,d)||(s=jc(f,s,Lt(D)?D.anchor:null,A),s===null)||(x=jc(d,x,Lt(D)?D.focus:null,A),x===null||s.type==="element"&&x.type==="element"&&(f=fo(f),d=fo(d),on(f)&&on(d)))?null:(jn(s,x,D),[s,x])}function po(f,s,d,x,A,D){let z=Jr();return f=new ki(new er(f,s,A),new er(d,x,D),0,""),f.dirty=!0,z._selection=f}function go(){return new fa(new Set)}function xr(f){let s=f.getEditorState()._selection,d=ho(f._window);return Lt(s)||s==null?Mi(s,d,f):s.clone()}function Mi(f,s,d){var x=d._window;if(x===null)return null;var A=x.event,D=A?A.type:void 0;x=D==="selectionchange",A=!st&&(x||D==="beforeinput"||D==="compositionstart"||D==="compositionend"||D==="click"&&A&&A.detail===3||D==="drop"||D===void 0);let z;if(!Lt(f)||A){if(s===null)return null;if(A=s.anchorNode,D=s.focusNode,z=s.anchorOffset,s=s.focusOffset,x&&Lt(f)&&!lt(d,A,D))return f.clone()}else return f.clone();if(d=pr(A,z,D,s,d,f),d===null)return null;let[ie,xe]=d;return new ki(ie,xe,Lt(f)?f.format:0,Lt(f)?f.style:"")}function pn(){return Jr()._selection}function oi(){return _n()._editorState._selection}function Pi(f,s,d,x=1){var A=f.anchor,D=f.focus,z=A.getNode(),ie=D.getNode();if(s.is(z)||s.is(ie)){if(z=s.__key,f.isCollapsed())s=A.offset,(d<=s&&0<x||d<s&&0>x)&&(d=Math.max(0,s+x),A.set(z,d,"element"),D.set(z,d,"element"),os(f));else{let Re=f.isBackward();ie=Re?D:A;var xe=ie.getNode();A=Re?A:D,D=A.getNode(),s.is(xe)&&(xe=ie.offset,(d<=xe&&0<x||d<xe&&0>x)&&ie.set(z,Math.max(0,xe+x),"element")),s.is(D)&&(s=A.offset,(d<=s&&0<x||d<s&&0>x)&&A.set(z,Math.max(0,s+x),"element"))}os(f)}}function os(f){var s=f.anchor,d=s.offset;let x=f.focus;var A=x.offset,D=s.getNode(),z=x.getNode();if(f.isCollapsed())nt(D)&&(z=D.getChildrenSize(),z=(A=d>=z)?D.getChildAtIndex(z-1):D.getChildAtIndex(d),Nt(z)&&(d=0,A&&(d=z.getTextContentSize()),s.set(z.__key,d,"text"),x.set(z.__key,d,"text")));else{if(nt(D)){let ie=D.getChildrenSize();d=(f=d>=ie)?D.getChildAtIndex(ie-1):D.getChildAtIndex(d),Nt(d)&&(D=0,f&&(D=d.getTextContentSize()),s.set(d.__key,D,"text"))}nt(z)&&(d=z.getChildrenSize(),A=(s=A>=d)?z.getChildAtIndex(d-1):z.getChildAtIndex(A),Nt(A)&&(z=0,s&&(z=A.getTextContentSize()),x.set(A.__key,z,"text")))}}function Bc(f,s){if(s=s.getEditorState()._selection,f=f._selection,Lt(f)){var d=f.anchor;let x=f.focus,A;d.type==="text"&&(A=d.getNode(),A.selectionTransform(s,f)),x.type==="text"&&(d=x.getNode(),A!==d&&d.selectionTransform(s,f))}}function pa(f,s,d,x,A){let D=null,z=0,ie=null;x!==null?(D=x.__key,Nt(x)?(z=x.getTextContentSize(),ie="text"):nt(x)&&(z=x.getChildrenSize(),ie="element")):A!==null&&(D=A.__key,Nt(A)?ie="text":nt(A)&&(ie="element")),D!==null&&ie!==null?f.set(D,z,ie):(z=s.getIndexWithinParent(),z===-1&&(z=d.getChildrenSize()),f.set(d.__key,z,"element"))}function ii(f,s,d,x,A){f.type==="text"?(f.key=d,s||(f.offset+=A)):f.offset>x.getIndexWithinParent()&&--f.offset}function Ao(f,s,d){let x=[],A=null,D=null;f=f.getChildren();for(let Ve=0;Ve<f.length;Ve++){var z=f[Ve];ls(z)||B(108);var ie=z.getChildren();z=0;for(let Ze of ie){for(Br(Ze)||B(109);x[Ve]!==void 0&&x[Ve][z]!==void 0;)z++;ie=Ve;var xe=z,Re=Ze;let Ge={cell:Re,startColumn:xe,startRow:ie},Ie=Re.__rowSpan,it=Re.__colSpan;for(let vt=0;vt<Ie;vt++){x[ie+vt]===void 0&&(x[ie+vt]=[]);for(let $t=0;$t<it;$t++)x[ie+vt][xe+$t]=Ge}s.is(Re)&&(A=Ge),d.is(Re)&&(D=Ge),z+=Ze.__colSpan}}return A===null&&B(110),D===null&&B(111),[x,A,D]}function qs(f){f instanceof Gc||(f instanceof la?(f=Is(f,Br),Br(f)||B(114)):(f=Is(f.getNode(),Br),Br(f)||B(114)));let s=f.getParent();ls(s)||B(115);let d=s.getParent();return Uc(d)||B(116),[f,s,d]}function Ii(f){f.isCollapsed()||f.removeText();var s=f.anchor,d=s.getNode();if(!Nt(d))return s.offset;let x=d.getParent();return x?(d=d.splitText(s.offset),d.length===0?0:(s=s.offset===0?0:1,d=d[0].getIndexWithinParent()+s,!x.isInline()||d===0?d:((d=x.getChildAtIndex(d))&&x.insertNewAfter(f).append(d,...d.getNextSiblings()),x.getIndexWithinParent()+s))):(f=yo(),qn().append(f),f.select(),0)}function Zs(f){let s=yo(),d=null;for(let x=0;x<f.length;x++){let A=f[x],D=Ri(A);if(D||on(A)&&A.isInline()||nt(A)&&A.isInline()||Nt(A)||A.isParentRequired()){if(d===null&&(d=A.createParentElementNode(),s.append(d),D))continue;d!==null&&d.append(A)}else s.append(A),d=null}return s}let Bn=null,bn=null,wr=!1,Js=!1,ga=0,is={characterData:!0,childList:!0,subtree:!0};function ma(){return wr||Bn!==null&&Bn._readOnly}function tr(){wr&&B(13)}function Jr(){return Bn===null&&B(15),Bn}function _n(){return bn===null&&B(16),bn}function Wc(f,s,d){var x=s.__type;let A=f._nodes.get(x);for(A===void 0&&B(30,x),f=d.get(x),f===void 0&&(f=Array.from(A.transforms),d.set(x,f)),d=f.length,x=0;x<d&&(f[x](s),s.isAttached());x++);}function _h(f,s){s=s._dirtyLeaves,f=f._nodeMap;for(let d of s)s=f.get(d),Nt(s)&&s.isAttached()&&s.isSimpleText()&&!s.isUnmergeable()&&tt(s)}function Xs(f,s){let d=s._dirtyLeaves,x=s._dirtyElements;f=f._nodeMap;let A=Kt(),D=new Map;var z=d;let ie=z.size;for(var xe=x,Re=xe.size;0<ie||0<Re;){if(0<ie){s._dirtyLeaves=new Set;for(let Ve of z)z=f.get(Ve),Nt(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&tt(z),z!==void 0&&z!==void 0&&z.__key!==A&&z.isAttached()&&Wc(s,z,D),d.add(Ve);if(z=s._dirtyLeaves,ie=z.size,0<ie){ga++;continue}}s._dirtyLeaves=new Set,s._dirtyElements=new Map;for(let Ve of xe)xe=Ve[0],Re=Ve[1],(xe==="root"||Re)&&(z=f.get(xe),z!==void 0&&z!==void 0&&z.__key!==A&&z.isAttached()&&Wc(s,z,D),x.set(xe,Re));z=s._dirtyLeaves,ie=z.size,xe=s._dirtyElements,Re=xe.size,ga++}s._dirtyLeaves=d,s._dirtyElements=x}function zc(f,s){var d=f.type,x=s.get(d);if(x===void 0&&B(17,d),d=x.klass,f.type!==d.getType()&&B(18,d.name),d=d.importJSON(f),f=f.children,nt(d)&&Array.isArray(f))for(x=0;x<f.length;x++){let A=zc(f[x],s);d.append(A)}return d}function ya(f,s){let d=Bn,x=wr,A=bn;Bn=f,wr=!0,bn=null;try{return s()}finally{Bn=d,wr=x,bn=A}}function ai(f,s){let d=f._pendingEditorState,x=f._rootElement,A=f._headless||x===null;if(d!==null){var D=f._editorState,z=D._selection,ie=d._selection,xe=f._dirtyType!==0,Re=Bn,Ve=wr,Ze=bn,Ge=f._updating,Ie=f._observer,it=null;if(f._pendingEditorState=null,f._editorState=d,!A&&xe&&Ie!==null){bn=f,Bn=d,wr=!1,f._updating=!0;try{let gn=f._dirtyType,Tt=f._dirtyElements,rr=f._dirtyLeaves;Ie.disconnect();var vt=gn,$t=Tt,Vt=rr;Qn=wo=An="",Ga=vt===2,qr=null,dr=f,To=f._config,Yr=f._nodes,Mn=dr._listeners.mutation,Ln=$t,Fs=Vt,Zr=D._nodeMap,No=d._nodeMap,Tc=d._readOnly,js=new Map(f._keyToDOMMap);let Wr=new Map;Ka=Wr,Si("root",null),Ka=js=To=No=Zr=Fs=Ln=Yr=dr=void 0,it=Wr}catch(gn){if(gn instanceof Error&&f._onError(gn),Js)throw gn;Hc(f,null,x,d),Fe(f),f._dirtyType=2,Js=!0,ai(f,D),Js=!1;return}finally{Ie.observe(x,is),f._updating=Ge,Bn=Re,wr=Ve,bn=Ze}}d._readOnly||(d._readOnly=!0);var Rn=f._dirtyLeaves,Jn=f._dirtyElements,cs=f._normalizedNodes,Nr=f._updateTags,$o=f._deferred;xe&&(f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements=new Map,f._normalizedNodes=new Set,f._updateTags=new Set);var tl=f._decorators,xa=f._pendingDecorators||tl,yd=d._nodeMap,Vc;for(Vc in xa)yd.has(Vc)||(xa===tl&&(xa=Jo(f)),delete xa[Vc]);var Xr=A?null:ho(f._window);if(f._editable&&Xr!==null&&(xe||ie===null||ie.dirty)){bn=f,Bn=d;try{if(Ie!==null&&Ie.disconnect(),xe||ie===null||ie.dirty){let gn=f._blockCursorElement;gn!==null&&Ec(gn,f,x);e:{let Tt=Xr.anchorNode,rr=Xr.focusNode,Wr=Xr.anchorOffset,ci=Xr.focusOffset,Ir=document.activeElement;if(!(Nr.has("collaboration")&&Ir!==x||Ir!==null&&et(Ir)))if(Lt(ie)){var Ea=ie.anchor,Ca=ie.focus,si=Ea.key,xh=Ca.key,vd=Yt(f,si),Yc=Yt(f,xh),nl=Ea.offset,bd=Ca.offset,qc=ie.format,Zc=ie.style,Jc=ie.isCollapsed(),us=vd,Qr=Yc,Kn=!1;if(Ea.type==="text"){us=Rt(vd);let or=Ea.getNode();Kn=or.getFormat()!==qc||or.getStyle()!==Zc}else Lt(z)&&z.anchor.type==="text"&&(Kn=!0);if(Ca.type==="text"&&(Qr=Rt(Yc)),us!==null&&Qr!==null){if(Jc&&(z===null||Kn||Lt(z)&&(z.format!==qc||z.style!==Zc))){var St=performance.now();td=[qc,Zc,nl,si,St]}if(Wr===nl&&ci===bd&&Tt===us&&rr===Qr&&(Xr.type!=="Range"||!Jc)&&(Ir!==null&&x.contains(Ir)||x.focus({preventScroll:!0}),Ea.type!=="element"))break e;try{Xr.setBaseAndExtent(us,nl,Qr,bd)}catch{}if(!Nr.has("skip-scroll-into-view")&&ie.isCollapsed()&&x!==null&&x===document.activeElement){let or=ie instanceof ki&&ie.anchor.type==="element"?us.childNodes[nl]||null:0<Xr.rangeCount?Xr.getRangeAt(0):null;if(or!==null){let gr;if(or instanceof Text){let Lr=document.createRange();Lr.selectNode(or),gr=Lr.getBoundingClientRect()}else gr=or.getBoundingClientRect();let ko=x.ownerDocument,Mo=ko.defaultView;if(Mo!==null)for(var{top:li,bottom:wa}=gr,ds,rl,nr=x;nr!==null;){let Lr=nr===ko.body;if(Lr)ds=0,rl=wn(f).innerHeight;else{let al=nr.getBoundingClientRect();ds=al.top,rl=al.bottom}let ji=0;if(li<ds?ji=-(ds-li):wa>rl&&(ji=wa-rl),ji!==0)if(Lr)Mo.scrollBy(0,ji);else{let al=nr.scrollTop;nr.scrollTop+=ji;let Qc=nr.scrollTop-al;li-=Qc,wa-=Qc}if(Lr)break;nr=yn(nr)}}}Dc=!0}}else z!==null&<(f,Tt,rr)&&Xr.removeAllRanges()}}e:{let gn=f._blockCursorElement;if(Lt(ie)&&ie.isCollapsed()&&ie.anchor.type==="element"&&x.contains(document.activeElement)){let Tt=ie.anchor,rr=Tt.getNode(),Wr=Tt.offset,ci=rr.getChildrenSize(),Ir=!1,or=null;if(Wr===ci){let gr=rr.getChildAtIndex(Wr-1);xc(gr)&&(Ir=!0)}else{let gr=rr.getChildAtIndex(Wr);if(xc(gr)){let ko=gr.getPreviousSibling();(ko===null||xc(ko))&&(Ir=!0,or=f.getElementByKey(gr.__key))}}if(Ir){let gr=f.getElementByKey(rr.__key);if(gn===null){let ko=f._config.theme,Mo=document.createElement("div");Mo.contentEditable="false",Mo.setAttribute("data-lexical-cursor","true");let Lr=ko.blockCursor;if(Lr!==void 0){if(typeof Lr=="string"){let ji=Lr.split(" ");Lr=ko.blockCursor=ji}Lr!==void 0&&Mo.classList.add(...Lr)}f._blockCursorElement=gn=Mo}x.style.caretColor="transparent",or===null?gr.appendChild(gn):gr.insertBefore(gn,or);break e}}gn!==null&&Ec(gn,f,x)}Ie!==null&&Ie.observe(x,is)}finally{bn=Ze,Bn=Re}}if(it!==null){var Xc=it;let gn=Array.from(f._listeners.mutation),Tt=gn.length;for(let rr=0;rr<Tt;rr++){let[Wr,ci]=gn[rr],Ir=Xc.get(ci);Ir!==void 0&&Wr(Ir,{dirtyLeaves:Rn,prevEditorState:D,updateTags:Nr})}}Lt(ie)||ie===null||z!==null&&z.is(ie)||f.dispatchCommand(e,void 0);var ol=f._pendingDecorators;ol!==null&&(f._decorators=ol,f._pendingDecorators=null,as("decorator",f,!0,ol));var _d=ra(s||D),Do=ra(d);if(_d!==Do&&as("textcontent",f,!0,Do),as("update",f,!0,{dirtyElements:Jn,dirtyLeaves:Rn,editorState:d,normalizedNodes:cs,prevEditorState:s||D,tags:Nr}),f._deferred=[],$o.length!==0){let gn=f._updating;f._updating=!0;try{for(let Tt=0;Tt<$o.length;Tt++)$o[Tt]()}finally{f._updating=gn}}var il=f._updates;if(il.length!==0){let gn=il.shift();if(gn){let[Tt,rr]=gn;hd(f,Tt,rr)}}}}function as(f,s,d,...x){let A=s._updating;s._updating=d;try{let D=Array.from(s._listeners[f]);for(f=0;f<D.length;f++)D[f].apply(null,x)}finally{s._updating=A}}function pt(f,s,d){if(f._updating===!1||bn!==f){let D=!1;return f.update(()=>{D=pt(f,s,d)}),D}let x=Ee(f);for(let D=4;0<=D;D--)for(let z=0;z<x.length;z++){var A=x[z]._commands.get(s);if(A!==void 0&&(A=A[D],A!==void 0)){A=Array.from(A);let ie=A.length;for(let xe=0;xe<ie;xe++)if(A[xe](d,f)===!0)return!0}}return!1}function fd(f,s){let d=f._updates;for(s=s||!1;d.length!==0;){var x=d.shift();if(x){let[A,D]=x,z;D!==void 0&&(x=D.onUpdate,z=D.tag,D.skipTransforms&&(s=!0),x&&f._deferred.push(x),z&&f._updateTags.add(z)),A()}}return s}function hd(f,s,d){let x=f._updateTags;var A,D=A=!1;if(d!==void 0){var z=d.onUpdate;A=d.tag,A!=null&&x.add(A),A=d.skipTransforms||!1,D=d.discrete||!1}z&&f._deferred.push(z),d=f._editorState,z=f._pendingEditorState;let ie=!1;(z===null||z._readOnly)&&(z=f._pendingEditorState=new _a(new Map((z||d)._nodeMap)),ie=!0),z._flushSync=D,D=Bn;let xe=wr,Re=bn,Ve=f._updating;Bn=z,wr=!1,f._updating=!0,bn=f;try{ie&&(f._headless?d._selection!=null&&(z._selection=d._selection.clone()):z._selection=xr(f));let Ze=f._compositionKey;s(),A=fd(f,A),Bc(z,f),f._dirtyType!==0&&(A?_h(z,f):Xs(z,f),fd(f),ch(d,z,f._dirtyLeaves,f._dirtyElements)),Ze!==f._compositionKey&&(z._flushSync=!0);let Ge=z._selection;if(Lt(Ge)){let Ie=z._nodeMap,it=Ge.focus.key;Ie.get(Ge.anchor.key)!==void 0&&Ie.get(it)!==void 0||B(19)}else ri(Ge)&&Ge._nodes.size===0&&(z._selection=null)}catch(Ze){Ze instanceof Error&&f._onError(Ze),f._pendingEditorState=d,f._dirtyType=2,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),ai(f);return}finally{Bn=D,wr=xe,bn=Re,f._updating=Ve,ga=0}f._dirtyType!==0||ba(z,f)?z._flushSync?(z._flushSync=!1,ai(f)):ie&&Qe(()=>{ai(f)}):(z._flushSync=!1,ie&&(x.clear(),f._deferred=[],f._pendingEditorState=null))}function Pr(f,s,d){f._updating?f._updates.push([s,d]):hd(f,s,d)}class Qs extends la{constructor(s){super(s)}decorate(){B(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function on(f){return f instanceof Qs}class Ro extends la{constructor(s){super(s),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let s=this.getFormat();return Pe[s]||""}getIndent(){return this.getLatest().__indent}getChildren(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getChildrenKeys(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d.__key),d=d.getNextSibling();return s}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let s=_n()._dirtyElements;return s!==null&&s.has(this.__key)}isLastChild(){let s=this.getLatest(),d=this.getParentOrThrow().getLastChild();return d!==null&&d.is(s)}getAllTextNodes(){let s=[],d=this.getFirstChild();for(;d!==null;){if(Nt(d)&&s.push(d),nt(d)){let x=d.getAllTextNodes();s.push(...x)}d=d.getNextSibling()}return s}getFirstDescendant(){let s=this.getFirstChild();for(;s!==null;){if(nt(s)){let d=s.getFirstChild();if(d!==null){s=d;continue}}break}return s}getLastDescendant(){let s=this.getLastChild();for(;s!==null;){if(nt(s)){let d=s.getLastChild();if(d!==null){s=d;continue}}break}return s}getDescendantByIndex(s){let d=this.getChildren(),x=d.length;return s>=x?(s=d[x-1],nt(s)&&s.getLastDescendant()||s||null):(s=d[s],nt(s)&&s.getFirstDescendant()||s||null)}getFirstChild(){let s=this.getLatest().__first;return s===null?null:sn(s)}getFirstChildOrThrow(){let s=this.getFirstChild();return s===null&&B(45,this.__key),s}getLastChild(){let s=this.getLatest().__last;return s===null?null:sn(s)}getLastChildOrThrow(){let s=this.getLastChild();return s===null&&B(96,this.__key),s}getChildAtIndex(s){var d=this.getChildrenSize();let x;if(s<d/2){for(x=this.getFirstChild(),d=0;x!==null&&d<=s;){if(d===s)return x;x=x.getNextSibling(),d++}return null}for(x=this.getLastChild(),--d;x!==null&&d>=s;){if(d===s)return x;x=x.getPreviousSibling(),d--}return null}getTextContent(){let s="",d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContent(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=`
|
|
264
|
+
|
|
265
|
+
`)}return s}getTextContentSize(){let s=0,d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContentSize(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=2)}return s}getDirection(){return this.getLatest().__dir}hasFormat(s){return s!==""?(s=Me[s],(this.getFormat()&s)!==0):!1}select(s,d){tr();let x=pn(),A=s,D=d;var z=this.getChildrenSize();if(!this.canBeEmpty()){if(s===0&&d===0){if(s=this.getFirstChild(),Nt(s)||nt(s))return s.select(0,0)}else if(!(s!==void 0&&s!==z||d!==void 0&&d!==z)&&(s=this.getLastChild(),Nt(s)||nt(s)))return s.select()}if(A===void 0&&(A=z),D===void 0&&(D=z),z=this.__key,Lt(x))x.anchor.set(z,A,"element"),x.focus.set(z,D,"element"),x.dirty=!0;else return po(z,A,z,D,"element","element");return x}selectStart(){let s=this.getFirstDescendant();return s?s.selectStart():this.select()}selectEnd(){let s=this.getLastDescendant();return s?s.selectEnd():this.select()}clear(){let s=this.getWritable();return this.getChildren().forEach(d=>d.remove()),s}append(...s){return this.splice(this.getChildrenSize(),0,s)}setDirection(s){let d=this.getWritable();return d.__dir=s,d}setFormat(s){return this.getWritable().__format=s!==""?Me[s]:0,this}setIndent(s){return this.getWritable().__indent=s,this}splice(s,d,x){let A=x.length,D=this.getChildrenSize(),z=this.getWritable(),ie=z.__key;var xe=[],Re=[];let Ve=this.getChildAtIndex(s+d),Ze=null,Ge=D-d+A;if(s!==0)if(s===D)Ze=this.getLastChild();else{var Ie=this.getChildAtIndex(s);Ie!==null&&(Ze=Ie.getPreviousSibling())}if(0<d){var it=Ze===null?this.getFirstChild():Ze.getNextSibling();for(Ie=0;Ie<d;Ie++){it===null&&B(100);var vt=it.getNextSibling(),$t=it.__key;it=it.getWritable(),yt(it),Re.push($t),it=vt}}for(Ie=Ze,vt=0;vt<A;vt++){$t=x[vt],Ie!==null&&$t.is(Ie)&&(Ze=Ie=Ie.getPreviousSibling()),it=$t.getWritable(),it.__parent===ie&&Ge--,yt(it);let Vt=$t.__key;Ie===null?(z.__first=Vt,it.__prev=null):(Ie=Ie.getWritable(),Ie.__next=Vt,it.__prev=Ie.__key),$t.__key===ie&&B(76),it.__parent=ie,xe.push(Vt),Ie=$t}if(s+d===D?Ie!==null&&(Ie.getWritable().__next=null,z.__last=Ie.__key):Ve!==null&&(s=Ve.getWritable(),Ie!==null?(d=Ie.getWritable(),s.__prev=Ie.__key,d.__next=Ve.__key):s.__prev=null),z.__size=Ge,Re.length&&(s=pn(),Lt(s))){Re=new Set(Re),xe=new Set(xe);let{anchor:Vt,focus:Rn}=s;va(Vt,Re,xe)&&pa(Vt,Vt.getNode(),this,Ze,Ve),va(Rn,Re,xe)&&pa(Rn,Rn.getNode(),this,Ze,Ve),Ge!==0||this.canBeEmpty()||Mr(this)||this.remove()}return z}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function nt(f){return f instanceof Ro}function va(f,s,d){for(f=f.getNode();f;){let x=f.__key;if(s.has(x)&&!d.has(x))return!0;f=f.getParent()}return!1}class Li extends Ro{static getType(){return"root"}static clone(){return new Li}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){B(51)}getTextContent(){let s=this.__cachedText;return!ma()&&_n()._dirtyType!==0||s===null?super.getTextContent():s}remove(){B(52)}replace(){B(53)}insertBefore(){B(54)}insertAfter(){B(55)}updateDOM(){return!1}append(...s){for(let d=0;d<s.length;d++){let x=s[d];nt(x)||on(x)||B(56)}return super.append(...s)}static importJSON(s){let d=qn();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Tr(f){return f instanceof Li}function ba(f,s){if(s=s.getEditorState()._selection,f=f._selection,f!==null){if(f.dirty||!f.is(s))return!0}else if(s!==null)return!0;return!1}function Fi(){return new _a(new Map([["root",new Li]]))}function el(f){let s=f.exportJSON();var d=f.constructor;s.type!==d.getType()&&B(130,d.name);let x=s.children;if(nt(f))for(Array.isArray(x)||B(59,d.name),f=f.getChildren(),d=0;d<f.length;d++){let A=el(f[d]);x.push(A)}return s}class _a{constructor(s,d){this._nodeMap=s,this._selection=d||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(s){return ya(this,s)}clone(s){return s=new _a(this._nodeMap,s===void 0?this._selection:s),s._readOnly=!0,s}toJSON(){return ya(this,()=>({root:el(qn())}))}}class mo extends Ro{static getType(){return"paragraph"}static clone(s){return new mo(s.__key)}createDOM(s){let d=document.createElement("p");return s=xt(s.theme,"paragraph"),s!==void 0&&d.classList.add(...s),d}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:ss,priority:0})}}exportDOM(s){if({element:s}=super.exportDOM(s),s&&Qo(s)){this.isEmpty()&&s.append(document.createElement("br"));var d=this.getFormatType();s.style.textAlign=d,(d=this.getDirection())&&(s.dir=d),d=this.getIndent(),0<d&&(s.style.textIndent=`${20*d}px`)}return{element:s}}static importJSON(s){let d=yo();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(s,d){s=yo();let x=this.getDirection();return s.setDirection(x),this.insertAfter(s,d),s}collapseAtStart(){let s=this.getChildren();if(s.length===0||Nt(s[0])&&s[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ss(f){let s=yo();return f.style&&(s.setFormat(f.style.textAlign),f=parseInt(f.style.textIndent,10)/20,0<f&&s.setIndent(f)),{node:s}}function yo(){return Xo(new mo)}function Hc(f,s,d,x){let A=f._keyToDOMMap;A.clear(),f._editorState=Fi(),f._pendingEditorState=x,f._compositionKey=null,f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),f._normalizedNodes=new Set,f._updateTags=new Set,f._updates=[],f._blockCursorElement=null,x=f._observer,x!==null&&(x.disconnect(),f._observer=null),s!==null&&(s.textContent=""),d!==null&&(d.textContent="",A.set("root",d))}function pd(f,s){let d=new Map,x=new Set,A=D=>{Object.keys(D).forEach(z=>{let ie=d.get(z);ie===void 0&&(ie=[],d.set(z,ie)),ie.push(D[z])})};return f.forEach(D=>{D=D.klass.importDOM!=null?D.klass.importDOM.bind(D.klass):null,D==null||x.has(D)||(x.add(D),D=D(),D!==null&&A(D))}),s&&A(s),d}class gd{constructor(s,d,x,A,D,z,ie){this._parentEditor=d,this._rootElement=null,this._editorState=s,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=A,this._nodes=x,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=ae(),this._onError=D,this._htmlConversions=z,this._editable=ie,this._headless=d!==null&&d._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(s){let d=this._listeners.update;return d.add(s),()=>{d.delete(s)}}registerEditableListener(s){let d=this._listeners.editable;return d.add(s),()=>{d.delete(s)}}registerDecoratorListener(s){let d=this._listeners.decorator;return d.add(s),()=>{d.delete(s)}}registerTextContentListener(s){let d=this._listeners.textcontent;return d.add(s),()=>{d.delete(s)}}registerRootListener(s){let d=this._listeners.root;return s(this._rootElement,null),d.add(s),()=>{s(null,this._rootElement),d.delete(s)}}registerCommand(s,d,x){x===void 0&&B(35);let A=this._commands;A.has(s)||A.set(s,[new Set,new Set,new Set,new Set,new Set]);let D=A.get(s);D===void 0&&B(36,String(s));let z=D[x];return z.add(d),()=>{z.delete(d),D.every(ie=>ie.size===0)&&A.delete(s)}}registerMutationListener(s,d){this._nodes.get(s.getType())===void 0&&B(37,s.name);let x=this._listeners.mutation;return x.set(d,s),()=>{x.delete(d)}}registerNodeTransformToKlass(s,d){var x=s.getType();return x=this._nodes.get(x),x===void 0&&B(37,s.name),x.transforms.add(d),x}registerNodeTransform(s,d){var x=this.registerNodeTransformToKlass(s,d);let A=[x];return x=x.replaceWithKlass,x!=null&&(x=this.registerNodeTransformToKlass(x,d),A.push(x)),Cr(this,s.getType()),()=>{A.forEach(D=>D.transforms.delete(d))}}hasNode(s){return this._nodes.has(s.getType())}hasNodes(s){return s.every(this.hasNode.bind(this))}dispatchCommand(s,d){return pt(this,s,d)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(s){let d=this._rootElement;if(s!==d){let z=xt(this._config.theme,"root");var x=this._pendingEditorState||this._editorState;if(this._rootElement=s,Hc(this,d,s,x),d!==null){if(!this._config.disableEvents){qa!==0&&(qa--,qa===0&&d.ownerDocument.removeEventListener("selectionchange",sd));var A=d.__lexicalEditor;if(A!=null){if(A._parentEditor!==null){var D=Ee(A);D=D[D.length-1]._key,sa.get(D)===A&&sa.delete(D)}else sa.delete(A._key);d.__lexicalEditor=null}for(A=ad(d),D=0;D<A.length;D++)A[D]();d.__lexicalEventHandles=[]}z!=null&&d.classList.remove(...z)}s!==null?(x=(x=s.ownerDocument)&&x.defaultView||null,A=s.style,A.userSelect="text",A.whiteSpace="pre-wrap",A.wordBreak="break-word",s.setAttribute("data-lexical-editor","true"),this._window=x,this._dirtyType=2,Fe(this),this._updateTags.add("history-merge"),ai(this),this._config.disableEvents||yh(s,this),z!=null&&s.classList.add(...z)):(this._editorState=x,this._window=this._pendingEditorState=null),as("root",this,!1,s,d)}}getElementByKey(s){return this._keyToDOMMap.get(s)||null}getEditorState(){return this._editorState}setEditorState(s,d){s.isEmpty()&&B(38),De(this);let x=this._pendingEditorState,A=this._updateTags;d=d!==void 0?d.tag:null,x===null||x.isEmpty()||(d!=null&&A.add(d),ai(this)),this._pendingEditorState=s,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,d!=null&&A.add(d),ai(this)}parseEditorState(s,d){s=typeof s=="string"?JSON.parse(s):s;let x=Fi(),A=Bn,D=wr,z=bn,ie=this._dirtyElements,xe=this._dirtyLeaves,Re=this._cloneNotNeeded,Ve=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Bn=x,wr=!1,bn=this;try{zc(s.root,this._nodes),d&&d(),x._readOnly=!0}catch(Ze){Ze instanceof Error&&this._onError(Ze)}finally{this._dirtyElements=ie,this._dirtyLeaves=xe,this._cloneNotNeeded=Re,this._dirtyType=Ve,Bn=A,wr=D,bn=z}return x}update(s,d){Pr(this,s,d)}focus(s,d={}){let x=this._rootElement;x!==null&&(x.setAttribute("autocapitalize","off"),Pr(this,()=>{let A=pn(),D=qn();A!==null?A.dirty=!0:D.getChildrenSize()!==0&&(d.defaultSelection==="rootStart"?D.selectStart():D.selectEnd())},{onUpdate:()=>{x.removeAttribute("autocapitalize"),s&&s()},tag:"focus"}),this._pendingEditorState===null&&x.removeAttribute("autocapitalize"))}blur(){var s=this._rootElement;s!==null&&s.blur(),s=ho(this._window),s!==null&&s.removeAllRanges()}isEditable(){return this._editable}setEditable(s){this._editable!==s&&(this._editable=s,as("editable",this,!0,s))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Gc extends Ro{constructor(s,d){super(d),this.__colSpan=s,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(s){return this.getWritable().__colSpan=s,this}getRowSpan(){return this.__rowSpan}setRowSpan(s){return this.getWritable().__rowSpan=s,this}}function Br(f){return f instanceof Gc}class Kc extends Ro{}function Uc(f){return f instanceof Kc}class md extends Ro{}function ls(f){return f instanceof md}return Ue.$INTERNAL_isPointSelection=jr,Ue.$addUpdateTag=function(f){tr(),_n()._updateTags.add(f)},Ue.$applyNodeReplacement=Xo,Ue.$copyNode=ia,Ue.$createLineBreakNode=Ai,Ue.$createNodeSelection=go,Ue.$createParagraphNode=yo,Ue.$createRangeSelection=function(){let f=new er("root",0,"element"),s=new er("root",0,"element");return new ki(f,s,0,"")},Ue.$createTabNode=Us,Ue.$createTextNode=Fn,Ue.$getAdjacentNode=At,Ue.$getNearestNodeFromDOMNode=Er,Ue.$getNearestRootOrShadowRoot=Zn,Ue.$getNodeByKey=sn,Ue.$getPreviousSelection=oi,Ue.$getRoot=qn,Ue.$getSelection=pn,Ue.$getTextContent=function(){let f=pn();return f===null?"":f.getTextContent()},Ue.$hasAncestor=_r,Ue.$hasUpdateTag=function(f){return _n()._updateTags.has(f)},Ue.$insertNodes=function(f){let s=pn()||oi();s===null&&(s=qn().selectEnd()),s.insertNodes(f)},Ue.$isBlockElementNode=function(f){return nt(f)&&!f.isInline()},Ue.$isDecoratorNode=on,Ue.$isElementNode=nt,Ue.$isInlineElementOrDecoratorNode=function(f){return nt(f)&&f.isInline()||on(f)&&f.isInline()},Ue.$isLeafNode=function(f){return Nt(f)||Ri(f)||on(f)},Ue.$isLineBreakNode=Ri,Ue.$isNodeSelection=ri,Ue.$isParagraphNode=function(f){return f instanceof mo},Ue.$isRangeSelection=Lt,Ue.$isRootNode=Tr,Ue.$isRootOrShadowRoot=Mr,Ue.$isTabNode=Lc,Ue.$isTextNode=Nt,Ue.$nodesOfType=function(f){var s=Jr();let d=s._readOnly,x=f.getType();s=s._nodeMap;let A=[];for(let[,D]of s)D instanceof f&&D.__type===x&&(d||D.isAttached())&&A.push(D);return A},Ue.$normalizeSelection__EXPERIMENTAL=ut,Ue.$parseSerializedNode=function(f){return zc(f,_n()._nodes)},Ue.$selectAll=function(){var f=qn();f=f.select(0,f.getChildrenSize()),br(ut(f))},Ue.$setCompositionKey=Dt,Ue.$setSelection=br,Ue.$splitNode=function(f,s){let d=f.getChildAtIndex(s);d==null&&(d=f),Mr(f)&&B(102);let x=z=>{const ie=z.getParentOrThrow(),xe=Mr(ie),Re=z!==d||xe?ia(z):z;if(xe)return z.insertAfter(Re),[z,Re,Re];const[Ve,Ze,Ge]=x(ie);return z=z.getNextSiblings(),Ge.append(Re,...z),[Ve,Ze,Re]},[A,D]=x(d);return[A,D]},Ue.BLUR_COMMAND=ee,Ue.CAN_REDO_COMMAND={},Ue.CAN_UNDO_COMMAND={},Ue.CLEAR_EDITOR_COMMAND={},Ue.CLEAR_HISTORY_COMMAND={},Ue.CLICK_COMMAND=t,Ue.COMMAND_PRIORITY_CRITICAL=4,Ue.COMMAND_PRIORITY_EDITOR=0,Ue.COMMAND_PRIORITY_HIGH=3,Ue.COMMAND_PRIORITY_LOW=1,Ue.COMMAND_PRIORITY_NORMAL=2,Ue.CONTROLLED_TEXT_INSERTION_COMMAND=i,Ue.COPY_COMMAND=te,Ue.CUT_COMMAND=fe,Ue.DELETE_CHARACTER_COMMAND=n,Ue.DELETE_LINE_COMMAND=p,Ue.DELETE_WORD_COMMAND=u,Ue.DEPRECATED_$computeGridMap=Ao,Ue.DEPRECATED_$createGridSelection=function(){let f=new er("root",0,"element"),s=new er("root",0,"element");return new Di("root",f,s)},Ue.DEPRECATED_$getGridCellNodeRect=Fc,Ue.DEPRECATED_$getNodeTriplet=qs,Ue.DEPRECATED_$isGridCellNode=Br,Ue.DEPRECATED_$isGridNode=Uc,Ue.DEPRECATED_$isGridRowNode=ls,Ue.DEPRECATED_$isGridSelection=cd,Ue.DEPRECATED_GridCellNode=Gc,Ue.DEPRECATED_GridNode=Kc,Ue.DEPRECATED_GridRowNode=md,Ue.DRAGEND_COMMAND=pe,Ue.DRAGOVER_COMMAND=de,Ue.DRAGSTART_COMMAND=Q,Ue.DROP_COMMAND=U,Ue.DecoratorNode=Qs,Ue.ElementNode=Ro,Ue.FOCUS_COMMAND=j,Ue.FORMAT_ELEMENT_COMMAND={},Ue.FORMAT_TEXT_COMMAND=g,Ue.INDENT_CONTENT_COMMAND={},Ue.INSERT_LINE_BREAK_COMMAND=r,Ue.INSERT_PARAGRAPH_COMMAND=o,Ue.INSERT_TAB_COMMAND={},Ue.KEY_ARROW_DOWN_COMMAND=k,Ue.KEY_ARROW_LEFT_COMMAND=T,Ue.KEY_ARROW_RIGHT_COMMAND=y,Ue.KEY_ARROW_UP_COMMAND=R,Ue.KEY_BACKSPACE_COMMAND=Y,Ue.KEY_DELETE_COMMAND=oe,Ue.KEY_DOWN_COMMAND=b,Ue.KEY_ENTER_COMMAND=P,Ue.KEY_ESCAPE_COMMAND=X,Ue.KEY_MODIFIER_COMMAND=ne,Ue.KEY_SPACE_COMMAND=M,Ue.KEY_TAB_COMMAND=Z,Ue.LineBreakNode=ca,Ue.MOVE_TO_END=v,Ue.MOVE_TO_START=O,Ue.OUTDENT_CONTENT_COMMAND={},Ue.PASTE_COMMAND=a,Ue.ParagraphNode=mo,Ue.REDO_COMMAND=C,Ue.REMOVE_TEXT_COMMAND=l,Ue.RootNode=Li,Ue.SELECTION_CHANGE_COMMAND=e,Ue.SELECT_ALL_COMMAND=V,Ue.TabNode=Oo,Ue.TextNode=ei,Ue.UNDO_COMMAND=_,Ue.createCommand=function(){return{}},Ue.createEditor=function(f){var s=f||{},d=bn,x=s.theme||{};let A=f===void 0?d:s.parentEditor||null,D=s.disableEvents||!1,z=Fi(),ie=s.namespace||(A!==null?A._config.namespace:ae()),xe=s.editorState,Re=[Li,ei,ca,Oo,mo,...s.nodes||[]],{onError:Ve,html:Ze}=s;if(s=s.editable!==void 0?s.editable:!0,f===void 0&&d!==null)f=d._nodes;else for(f=new Map,d=0;d<Re.length;d++){let Ie=Re[d],it=null;var Ge=null;typeof Ie!="function"&&(Ge=Ie,Ie=Ge.replace,it=Ge.with,Ge=Ge.withKlass||null);let vt=Ie.getType(),$t=Ie.transform(),Vt=new Set;$t!==null&&Vt.add($t),f.set(vt,{exportDOM:Ze&&Ze.export?Ze.export.get(Ie):void 0,klass:Ie,replace:it,replaceWithKlass:Ge,transforms:Vt})}return x=new gd(z,A,f,{disableEvents:D,namespace:ie,theme:x},Ve||console.error,pd(f,Ze?Ze.import:void 0),s),xe!==void 0&&(x._pendingEditorState=xe,x._dirtyType=2),x},Ue.getNearestEditorFromDOMNode=wt,Ue.isHTMLAnchorElement=function(f){return Qo(f)&&f.tagName==="A"},Ue.isHTMLElement=Qo,Ue.isSelectionCapturedInDecoratorInput=et,Ue.isSelectionWithinEditor=lt,Ue}var Mb,Pb;function Xt(){return Pb||(Pb=1,Mb=process.env.NODE_ENV==="development"?U9():V9()),Mb}var Ib;function Y9(){if(Ib)return cp;Ib=1;var e=cr(),t=Xt(),n=H;const r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;const i={tag:"history-merge"};function a({initialConfig:u,children:p}){const g=n.useMemo(()=>{const{theme:_,namespace:C,editor__DEPRECATED:b,nodes:y,onError:v,editorState:T,html:O}=u,R=e.createLexicalComposerContext(null,_);let k=b||null;if(k===null){const P=t.createEditor({editable:u.editable,html:O,namespace:C,nodes:y,onError:M=>v(M,P),theme:_});l(P,T),k=P}return[k,R]},[]);return o(()=>{const _=u.editable,[C]=g;C.setEditable(_!==void 0?_:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:g},p)}function l(u,p){if(p!==null){if(p===void 0)u.update(()=>{const g=t.$getRoot();if(g.isEmpty()){const _=t.$createParagraphNode();g.append(_);const C=r?document.activeElement:null;(t.$getSelection()!==null||C!==null&&C===u.getRootElement())&&_.select()}},i);else if(p!==null)switch(typeof p){case"string":{const g=u.parseEditorState(p);u.setEditorState(g,i);break}case"object":{u.setEditorState(p,i);break}case"function":{u.update(()=>{t.$getRoot().isEmpty()&&p(u)},i);break}}}}return cp.LexicalComposer=a,cp}var up={},Lb;function q9(){if(Lb)return up;Lb=1;var e=cr(),t=Xt(),n=H;let r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};function a(l,u){if(u!==null){if(u===void 0)l.update(()=>{var p=t.$getRoot();if(p.isEmpty()){let g=t.$createParagraphNode();p.append(g),p=r?document.activeElement:null,(t.$getSelection()!==null||p!==null&&p===l.getRootElement())&&g.select()}},i);else if(u!==null)switch(typeof u){case"string":let p=l.parseEditorState(u);l.setEditorState(p,i);break;case"object":l.setEditorState(u,i);break;case"function":l.update(()=>{t.$getRoot().isEmpty()&&u(l)},i)}}}return up.LexicalComposer=function({initialConfig:l,children:u}){let p=n.useMemo(()=>{const{theme:g,namespace:_,editor__DEPRECATED:C,nodes:b,onError:y,editorState:v,html:T}=l,O=e.createLexicalComposerContext(null,g);let R=C||null;if(R===null){const k=t.createEditor({editable:l.editable,html:T,namespace:_,nodes:b,onError:P=>y(P,k),theme:g});a(k,v),R=k}return[R,O]},[]);return o(()=>{let g=l.editable,[_]=p;_.setEditable(g!==void 0?g:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:p},u)},up}process.env.NODE_ENV==="development"?Y9():q9();var dp={},fp,Fb;function Z9(){if(Fb)return fp;Fb=1;var e=cr(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(a){const[l]=e.useLexicalComposerContext(),u=t.useMemo(()=>a(l),[l,a]),p=t.useRef(u.initialValueFn()),[g,_]=t.useState(p.current);return n(()=>{const{initialValueFn:C,subscribe:b}=u,y=C();return p.current!==y&&(p.current=y,_(y)),b(v=>{p.current=v,_(v)})},[u,a]),g}function o(a){return{initialValueFn:()=>a.isEditable(),subscribe:l=>a.registerEditableListener(l)}}function i(){return r(o)}return fp=i,fp}var hp,jb;function J9(){if(jb)return hp;jb=1;var e=cr(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(i){let[a]=e.useLexicalComposerContext(),l=t.useMemo(()=>i(a),[a,i]),u=t.useRef(l.initialValueFn()),[p,g]=t.useState(u.current);return n(()=>{let{initialValueFn:_,subscribe:C}=l,b=_();return u.current!==b&&(u.current=b,g(b)),C(y=>{u.current=y,g(y)})},[l,i]),p}function o(i){return{initialValueFn:()=>i.isEditable(),subscribe:a=>i.registerEditableListener(a)}}return hp=function(){return r(o)},hp}var Bb,Wb;function CN(){return Wb||(Wb=1,Bb=process.env.NODE_ENV==="development"?Z9():J9()),Bb}var Ki={},zb;function X9(){if(zb)return Ki;zb=1;var e=Xt();function t(u,p){let g=u.getFirstChild(),_=0;e:for(;g!==null;){if(e.$isElementNode(g)){const y=g.getFirstChild();if(y!==null){g=y;continue}}else if(e.$isTextNode(g)){const y=g.getTextContentSize();if(_+y>p)return{node:g,offset:p-_};_+=y}const C=g.getNextSibling();if(C!==null){g=C;continue}let b=g.getParent();for(;b!==null;){const y=b.getNextSibling();if(y!==null){g=y;continue e}b=b.getParent()}break}return null}function n(u,p=!0){if(u)return!1;let g=o();return p&&(g=g.trim()),g===""}function r(u,p){return()=>n(u,p)}function o(){return e.$getRoot().getTextContent()}function i(u){if(!n(u,!1))return!1;const p=e.$getRoot().getChildren(),g=p.length;if(g>1)return!1;for(let _=0;_<g;_++){const C=p[_];if(e.$isDecoratorNode(C))return!1;if(e.$isElementNode(C)){if(!e.$isParagraphNode(C)||C.__indent!==0)return!1;const b=C.getChildren(),y=b.length;for(let v=0;v<y;v++){const T=b[_];if(!e.$isTextNode(T))return!1}}}return!0}function a(u){return()=>i(u)}function l(u,p,g,_){const C=k=>k instanceof g,b=k=>{const P=e.$createTextNode(k.getTextContent());P.setFormat(k.getFormat()),k.replace(P)},y=k=>k.getLatest().__mode,v=k=>{if(!k.isSimpleText())return;const P=k.getPreviousSibling();let M=k.getTextContent(),Y=k,X;if(e.$isTextNode(P)){const oe=P.getTextContent(),Z=oe+M,U=p(Z);if(C(P))if(U===null||y(P)!==0){b(P);return}else{const Q=U.end-oe.length;if(Q>0){const de=M.slice(0,Q),pe=oe+de;if(P.select(),P.setTextContent(pe),Q===M.length)k.remove();else{const te=M.slice(Q);k.setTextContent(te)}return}}else if(U===null||U.start<oe.length)return}for(;;){X=p(M);let oe=X===null?"":M.slice(X.end);if(M=oe,oe===""){const Q=Y.getNextSibling();if(e.$isTextNode(Q)){oe=Y.getTextContent()+Q.getTextContent();const de=p(oe);if(de===null){C(Q)?b(Q):Q.markDirty();return}else if(de.start!==0)return}}else{const Q=p(oe);if(Q!==null&&Q.start===0)return}if(X===null)return;if(X.start===0&&e.$isTextNode(P)&&P.isTextEntity())continue;let Z;X.start===0?[Z,Y]=Y.splitText(X.end):[,Z,Y]=Y.splitText(X.start,X.end);const U=_(Z);if(U.setFormat(Z.getFormat()),Z.replace(U),Y==null)return}},T=k=>{const P=k.getTextContent(),M=p(P);if(M===null||M.start!==0){b(k);return}if(P.length>M.end){k.splitText(M.end);return}const Y=k.getPreviousSibling();e.$isTextNode(Y)&&Y.isTextEntity()&&(b(Y),b(k));const X=k.getNextSibling();e.$isTextNode(X)&&X.isTextEntity()&&(b(X),C(k)&&b(k))},O=u.registerNodeTransform(e.TextNode,v),R=u.registerNodeTransform(g,T);return[O,R]}return Ki.$canShowPlaceholder=i,Ki.$canShowPlaceholderCurry=a,Ki.$findTextIntersectionFromCharacters=t,Ki.$isRootTextContentEmpty=n,Ki.$isRootTextContentEmptyCurry=r,Ki.$rootTextContent=o,Ki.registerLexicalTextEntity=l,Ki}var Ui={},Hb;function Q9(){if(Hb)return Ui;Hb=1;var e=Xt();function t(o,i=!0){return o?!1:(o=n(),i&&(o=o.trim()),o==="")}function n(){return e.$getRoot().getTextContent()}function r(o){if(!t(o,!1))return!1;o=e.$getRoot().getChildren();let i=o.length;if(1<i)return!1;for(let l=0;l<i;l++){var a=o[l];if(e.$isDecoratorNode(a))return!1;if(e.$isElementNode(a)){if(!e.$isParagraphNode(a)||a.__indent!==0)return!1;a=a.getChildren();let u=a.length;for(let p=0;p<u;p++)if(!e.$isTextNode(a[l]))return!1}}return!0}return Ui.$canShowPlaceholder=r,Ui.$canShowPlaceholderCurry=function(o){return()=>r(o)},Ui.$findTextIntersectionFromCharacters=function(o,i){var a=o.getFirstChild();o=0;e:for(;a!==null;){if(e.$isElementNode(a)){var l=a.getFirstChild();if(l!==null){a=l;continue}}else if(e.$isTextNode(a)){if(l=a.getTextContentSize(),o+l>i)return{node:a,offset:i-o};o+=l}if(l=a.getNextSibling(),l!==null)a=l;else{for(a=a.getParent();a!==null;){if(l=a.getNextSibling(),l!==null){a=l;continue e}a=a.getParent()}break}}return null},Ui.$isRootTextContentEmpty=t,Ui.$isRootTextContentEmptyCurry=function(o,i){return()=>t(o,i)},Ui.$rootTextContent=n,Ui.registerLexicalTextEntity=function(o,i,a,l){let u=g=>{const _=e.$createTextNode(g.getTextContent());_.setFormat(g.getFormat()),g.replace(_)},p=o.registerNodeTransform(e.TextNode,g=>{if(g.isSimpleText()){var _=g.getPreviousSibling(),C=g.getTextContent(),b=g;if(e.$isTextNode(_)){var y=_.getTextContent(),v=i(y+C);if(_ instanceof a){if(v===null||_.getLatest().__mode!==0){u(_);return}if(v=v.end-y.length,0<v){b=C.slice(0,v),b=y+b,_.select(),_.setTextContent(b),v===C.length?g.remove():(_=C.slice(v),g.setTextContent(_));return}}else if(v===null||v.start<y.length)return}for(;;){if(g=i(C),C=v=g===null?"":C.slice(g.end),v===""){if(y=b.getNextSibling(),e.$isTextNode(y)){if(v=b.getTextContent()+y.getTextContent(),v=i(v),v===null){y instanceof a?u(y):y.markDirty();break}else if(v.start!==0)break}}else if(y=i(v),y!==null&&y.start===0)break;if(g===null)break;if(g.start===0&&e.$isTextNode(_)&&_.isTextEntity())continue;let T;if(g.start===0?[T,b]=b.splitText(g.end):[,T,b]=b.splitText(g.start,g.end),g=l(T),g.setFormat(T.getFormat()),T.replace(g),b==null)break}}});return o=o.registerNodeTransform(a,g=>{var _=g.getTextContent();const C=i(_);C===null||C.start!==0?u(g):_.length>C.end?g.splitText(C.end):(_=g.getPreviousSibling(),e.$isTextNode(_)&&_.isTextEntity()&&(u(_),u(g)),_=g.getNextSibling(),e.$isTextNode(_)&&_.isTextEntity()&&(u(_),g instanceof a&&u(g)))}),[p,o]},Ui}var Gb,Kb;function wN(){return Kb||(Kb=1,Gb=process.env.NODE_ENV==="development"?X9():Q9()),Gb}var Pn={},ir={},Ub;function e7(){if(Ub)return ir;Ub=1;var e=Xt();const t=new Map;function n(V){let j=V;for(;j!=null;){if(j.nodeType===Node.TEXT_NODE)return j;j=j.firstChild}return null}function r(V){const j=V.parentNode;if(j==null)throw new Error("Should never happen");return[j,Array.from(j.childNodes).indexOf(V)]}function o(V,j,ee,ne,B){const W=j.getKey(),J=ne.getKey(),F=document.createRange();let w=V.getElementByKey(W),N=V.getElementByKey(J),I=ee,q=B;if(e.$isTextNode(j)&&(w=n(w)),e.$isTextNode(ne)&&(N=n(N)),j===void 0||ne===void 0||w===null||N===null)return null;w.nodeName==="BR"&&([w,I]=r(w)),N.nodeName==="BR"&&([N,q]=r(N));const ue=w.firstChild;w===N&&ue!=null&&ue.nodeName==="BR"&&I===0&&q===0&&(q=1);try{F.setStart(w,I),F.setEnd(N,q)}catch{return null}return F.collapsed&&(I!==q||W!==J)&&(F.setStart(N,q),F.setEnd(w,I)),F}function i(V,j){const ee=V.getRootElement();if(ee===null)return[];const ne=ee.getBoundingClientRect(),B=getComputedStyle(ee),W=parseFloat(B.paddingLeft)+parseFloat(B.paddingRight),J=Array.from(j.getClientRects());let F=J.length;J.sort((N,I)=>{const q=N.top-I.top;return Math.abs(q)<=3?N.left-I.left:q});let w;for(let N=0;N<F;N++){const I=J[N],q=w&&w.top<=I.top&&w.top+w.height>I.top&&w.left+w.width>I.left,ue=I.width+W===ne.width;if(q||ue){J.splice(N--,1),F--;continue}w=I}return J}function a(V){const j={},ee=V.split(";");for(const ne of ee)if(ne!==""){const[B,W]=ne.split(/:([^]+)/);B&&W&&(j[B.trim()]=W.trim())}return j}function l(V){let j=t.get(V);return j===void 0&&(j=a(V),t.set(V,j)),Object.freeze(j),j}function u(V){let j="";for(const ee in V)ee&&(j+=`${ee}: ${V[ee]};`);return j}function p(V,j){return V.__first=j.__first,V.__last=j.__last,V.__size=j.__size,V.__format=j.__format,V.__indent=j.__indent,V.__dir=j.__dir,V}function g(V,j){return V.__format=j.__format,V.__style=j.__style,V.__mode=j.__mode,V.__detail=j.__detail,V}function _(V){const j=V.constructor.clone(V);return j.__parent=V.__parent,j.__next=V.__next,j.__prev=V.__prev,e.$isElementNode(V)&&e.$isElementNode(j)?p(j,V):e.$isTextNode(V)&&e.$isTextNode(j)?g(j,V):j}function C(V,j){if(j.isSelected()&&!j.isSegmented()&&!j.isToken()&&e.$INTERNAL_isPointSelection(V)){const ee=V.anchor.getNode(),ne=V.focus.getNode(),B=j.is(ee),W=j.is(ne);if(B||W){const J=V.isBackward(),[F,w]=V.getCharacterOffsets(),N=ee.is(ne),I=j.is(J?ne:ee),q=j.is(J?ee:ne);let ue=0,he;if(N)ue=F>w?w:F,he=F>w?F:w;else if(I)ue=J?w:F,he=void 0;else if(q){const se=J?F:w;ue=0,he=se}return j.__text=j.__text.slice(ue,he),j}}return j}function b(V){return V.type==="text"?V.offset===V.getNode().getTextContentSize():V.offset===V.getNode().getChildrenSize()}function y(V,j,ee){let ne=j.getNode(),B=ee;if(e.$isElementNode(ne)){const W=ne.getDescendantByIndex(j.offset);W!==null&&(ne=W)}for(;B>0&&ne!==null;){if(e.$isElementNode(ne)){const N=ne.getLastDescendant();N!==null&&(ne=N)}let W=ne.getPreviousSibling(),J=0;if(W===null){let N=ne.getParentOrThrow(),I=N.getPreviousSibling();for(;I===null;){if(N=N.getParent(),N===null){W=null;break}I=N.getPreviousSibling()}N!==null&&(J=N.isInline()?0:2,W=I)}let F=ne.getTextContent();F===""&&e.$isElementNode(ne)&&!ne.isInline()&&(F=`
|
|
266
|
+
|
|
267
|
+
`);const w=F.length;if(!e.$isTextNode(ne)||B>=w){const N=ne.getParent();ne.remove(),N!=null&&N.getChildrenSize()===0&&!e.$isRootNode(N)&&N.remove(),B-=w+J,ne=W}else{const N=ne.getKey(),I=V.getEditorState().read(()=>{const he=e.$getNodeByKey(N);return e.$isTextNode(he)&&he.isSimpleText()?he.getTextContent():null}),q=w-B,ue=F.slice(0,q);if(I!==null&&I!==F){const he=e.$getPreviousSelection();let se=ne;if(ne.isSimpleText())ne.setTextContent(I);else{const Ce=e.$createTextNode(I);ne.replace(Ce),se=Ce}if(e.$isRangeSelection(he)&&he.isCollapsed()){const Ce=he.anchor.offset;se.select(Ce,Ce)}}else if(ne.isSimpleText()){const he=j.key===N;let se=j.offset;se<B&&(se=w);const Ce=he?se-B:0,Oe=he?se:q;if(he&&Ce===0){const[Be]=ne.splitText(Ce,Oe);Be.remove()}else{const[,Be]=ne.splitText(Ce,Oe);Be.remove()}}else{const he=e.$createTextNode(ue);ne.replace(he)}B=0}}}function v(V){const j=V.getStyle(),ee=a(j);t.set(j,ee)}function T(V,j){const ee=l("getStyle"in V?V.getStyle():V.style),ne=Object.entries(j).reduce((W,[J,F])=>(F===null?delete W[J]:W[J]=F,W),{...ee}),B=u(ne);V.setStyle(B),t.set(B,ne)}function O(V,j){const ee=V.getNodes(),ne=ee.length;if(e.DEPRECATED_$isGridSelection(V)){const ce=e.$createRangeSelection(),le=ce.anchor,ve=ce.focus;for(let Me=0;Me<ne;Me++){const Pe=ee[Me];e.DEPRECATED_$isGridCellNode(Pe)&&(le.set(Pe.getKey(),0,"element"),ve.set(Pe.getKey(),Pe.getChildrenSize(),"element"),O(e.$normalizeSelection__EXPERIMENTAL(ce),j))}e.$setSelection(V);return}const B=ne-1;let W=ee[0],J=ee[B];if(V.isCollapsed()&&e.$isRangeSelection(V)){T(V,j);return}const F=V.anchor,w=V.focus,N=W.getTextContent().length,I=w.offset;let q=F.offset;const ue=F.isBefore(w);let he=ue?q:I,se=ue?I:q;const Ce=ue?F.type:w.type,Oe=ue?w.type:F.type,Be=ue?w.key:F.key;if(e.$isTextNode(W)&&he===N){const ce=W.getNextSibling();e.$isTextNode(ce)&&(q=0,he=0,W=ce)}if(ee.length===1){if(e.$isTextNode(W)){if(he=Ce==="element"?0:q>I?I:q,se=Oe==="element"?N:q>I?q:I,he===se)return;if(he===0&&se===N)T(W,j),W.select(he,se);else{const ce=W.splitText(he,se),le=he===0?ce[0]:ce[1];T(le,j),le.select(0,se-he)}}}else{if(e.$isTextNode(W)&&he<W.getTextContentSize()&&(he!==0&&(W=W.splitText(he)[1],he=0,F.set(W.getKey(),he,"text")),T(W,j)),e.$isTextNode(J)){const ce=J.getTextContent().length;J.__key!==Be&&se!==0&&(se=ce),se!==ce&&([J]=J.splitText(se)),se!==0&&T(J,j)}for(let ce=1;ce<B;ce++){const le=ee[ce],ve=le.getKey();e.$isTextNode(le)&&ve!==W.getKey()&&ve!==J.getKey()&&!le.isToken()&&T(le,j)}}}function R(V,j){if(V.anchor.key==="root"){const B=j(),W=e.$getRoot(),J=W.getFirstChild();J?J.replace(B,!0):W.append(B);return}const ee=V.getNodes(),ne=fe(V.anchor.getNode(),te);ne&&ee.indexOf(ne)===-1&&ee.push(ne);for(let B=0;B<ee.length;B++){const W=ee[B];if(!te(W))continue;const J=j();J.setFormat(W.getFormatType()),J.setIndent(W.getIndent()),W.replace(J,!0)}}function k(V){return V.getNode().isAttached()}function P(V){let j=V;for(;j!==null&&!e.$isRootOrShadowRoot(j);){const ee=j.getLatest(),ne=j.getParent();ee.getChildrenSize()===0&&j.remove(!0),j=ne}}function M(V,j,ee=null){const ne=V.getNodes(),B=ne.length,W=V.anchor;if(B===0||B===1&&W.type==="element"&&W.getNode().getChildrenSize()===0){const w=W.type==="text"?W.getNode().getParentOrThrow():W.getNode(),N=w.getChildren();let I=j();I.setFormat(w.getFormatType()),I.setIndent(w.getIndent()),N.forEach(q=>I.append(q)),ee&&(I=ee.append(I)),w.replace(I);return}let J=null,F=[];for(let w=0;w<B;w++){const N=ne[w];e.$isRootOrShadowRoot(N)?(Y(V,F,F.length,j,ee),F=[],J=N):J===null||J!==null&&e.$hasAncestor(N,J)?F.push(N):(Y(V,F,F.length,j,ee),F=[N])}Y(V,F,F.length,j,ee)}function Y(V,j,ee,ne,B=null){if(j.length===0)return;const W=j[0],J=new Map,F=[];let w=e.$isElementNode(W)?W:W.getParentOrThrow();w.isInline()&&(w=w.getParentOrThrow());let N=!1;for(;w!==null;){const se=w.getPreviousSibling();if(se!==null){w=se,N=!0;break}if(w=w.getParentOrThrow(),e.$isRootOrShadowRoot(w))break}const I=new Set;for(let se=0;se<ee;se++){const Ce=j[se];e.$isElementNode(Ce)&&Ce.getChildrenSize()===0&&I.add(Ce.getKey())}const q=new Set;for(let se=0;se<ee;se++){const Ce=j[se];let Oe=Ce.getParent();if(Oe!==null&&Oe.isInline()&&(Oe=Oe.getParent()),Oe!==null&&e.$isLeafNode(Ce)&&!q.has(Ce.getKey())){const Be=Oe.getKey();if(J.get(Be)===void 0){const ce=ne();ce.setFormat(Oe.getFormatType()),ce.setIndent(Oe.getIndent()),F.push(ce),J.set(Be,ce),Oe.getChildren().forEach(le=>{ce.append(le),q.add(le.getKey()),e.$isElementNode(le)&&le.getChildrenKeys().forEach(ve=>q.add(ve))}),P(Oe)}}else if(I.has(Ce.getKey())){const Be=ne();Be.setFormat(Ce.getFormatType()),Be.setIndent(Ce.getIndent()),F.push(Be),Ce.remove(!0)}}if(B!==null)for(let se=0;se<F.length;se++){const Ce=F[se];B.append(Ce)}let ue=null;if(e.$isRootOrShadowRoot(w))if(N)if(B!==null)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce)}else{const se=w.getFirstChild();if(e.$isElementNode(se)&&(w=se),se===null)if(B)w.append(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];w.append(Oe),ue=Oe}else if(B!==null)se.insertBefore(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];se.insertBefore(Oe),ue=Oe}}else if(B)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce),ue=Ce}const he=e.$getPreviousSelection();e.$isRangeSelection(he)&&k(he.anchor)&&k(he.focus)?e.$setSelection(he.clone()):ue!==null?ue.selectEnd():V.dirty=!0}function X(V,j){const ee=e.$getAdjacentNode(V.focus,j);return e.$isDecoratorNode(ee)&&!ee.isIsolated()||e.$isElementNode(ee)&&!ee.isInline()&&!ee.canBeEmpty()}function oe(V,j,ee,ne){V.modify(j?"extend":"move",ee,ne)}function Z(V){const j=V.anchor.getNode();return(e.$isRootNode(j)?j:j.getParentOrThrow()).getDirection()==="rtl"}function U(V,j,ee){const ne=Z(V);oe(V,j,ee?!ne:ne,"character")}function Q(V){const j=V.anchor,ee=V.focus,ne=j.getNode().getTopLevelElementOrThrow().getParentOrThrow();let B=ne.getFirstDescendant(),W=ne.getLastDescendant(),J="element",F="element",w=0;e.$isTextNode(B)?J="text":!e.$isElementNode(B)&&B!==null&&(B=B.getParentOrThrow()),e.$isTextNode(W)?(F="text",w=W.getTextContentSize()):!e.$isElementNode(W)&&W!==null&&(W=W.getParentOrThrow()),B&&W&&(j.set(B.getKey(),0,J),ee.set(W.getKey(),w,F))}function de(V,j,ee){const ne=V.getStyle(),B=l(ne);return B!==null&&B[j]||ee}function pe(V,j,ee=""){let ne=null;const B=V.getNodes(),W=V.anchor,J=V.focus,F=V.isBackward(),w=F?J.offset:W.offset,N=F?J.getNode():W.getNode();if(V.isCollapsed()&&V.style!==""){const I=V.style,q=l(I);if(q!==null&&j in q)return q[j]}for(let I=0;I<B.length;I++){const q=B[I];if(!(I!==0&&w===0&&q.is(N))&&e.$isTextNode(q)){const ue=de(q,j,ee);if(ne===null)ne=ue;else if(ne!==ue){ne="";break}}}return ne===null?ee:ne}function te(V){if(e.$isDecoratorNode(V)&&!V.isInline())return!0;if(!e.$isElementNode(V)||e.$isRootOrShadowRoot(V))return!1;const j=V.getFirstChild(),ee=j===null||e.$isLineBreakNode(j)||e.$isTextNode(j)||j.isInline();return!V.isInline()&&V.canBeEmpty()!==!1&&ee}function fe(V,j){let ee=V;for(;ee!==null&&ee.getParent()!==null&&!j(ee);)ee=ee.getParentOrThrow();return j(ee)?ee:null}return ir.$addNodeStyle=v,ir.$cloneWithProperties=_,ir.$getSelectionStyleValueForProperty=pe,ir.$isAtNodeEnd=b,ir.$isParentElementRTL=Z,ir.$moveCaretSelection=oe,ir.$moveCharacter=U,ir.$patchStyleText=O,ir.$selectAll=Q,ir.$setBlocksType=R,ir.$shouldOverrideDefaultCharacterSelection=X,ir.$sliceSelectedTextNodeContent=C,ir.$wrapNodes=M,ir.createDOMRange=o,ir.createRectsFromDOMRange=i,ir.getStyleObjectFromCSS=l,ir.trimTextContentFromAnchor=y,ir}var ar={},Vb;function t7(){if(Vb)return ar;Vb=1;var e=Xt();let t=new Map;function n(y){for(;y!=null;){if(y.nodeType===Node.TEXT_NODE)return y;y=y.firstChild}return null}function r(y){let v=y.parentNode;if(v==null)throw Error("Should never happen");return[v,Array.from(v.childNodes).indexOf(y)]}function o(y){let v={};y=y.split(";");for(let T of y)if(T!==""){let[O,R]=T.split(/:([^]+)/);O&&R&&(v[O.trim()]=R.trim())}return v}function i(y){let v=t.get(y);return v===void 0&&(v=o(y),t.set(y,v)),v}function a(y){let v="";for(let T in y)T&&(v+=`${T}: ${y[T]};`);return v}function l(y,v){var T=i("getStyle"in y?y.getStyle():y.style);v=Object.entries(v).reduce((O,[R,k])=>(k===null?delete O[R]:O[R]=k,O),{...T}),T=a(v),y.setStyle(T),t.set(T,v)}function u(y,v){var T=y.getNodes(),O=T.length;if(e.DEPRECATED_$isGridSelection(y)){for(var R=e.$createRangeSelection(),k=R.anchor,P=R.focus,M=0;M<O;M++){var Y=T[M];e.DEPRECATED_$isGridCellNode(Y)&&(k.set(Y.getKey(),0,"element"),P.set(Y.getKey(),Y.getChildrenSize(),"element"),u(e.$normalizeSelection__EXPERIMENTAL(R),v))}e.$setSelection(y)}else if(--O,R=T[0],k=T[O],y.isCollapsed()&&e.$isRangeSelection(y))l(y,v);else{M=y.anchor;var X=y.focus;Y=R.getTextContent().length;var oe=X.offset,Z=M.offset,U=M.isBefore(X);P=U?Z:oe,y=U?oe:Z;var Q=U?M.type:X.type,de=U?X.type:M.type;if(X=U?X.key:M.key,e.$isTextNode(R)&&P===Y&&(U=R.getNextSibling(),e.$isTextNode(U)&&(P=Z=0,R=U)),T.length===1)e.$isTextNode(R)&&(P=Q==="element"?0:Z>oe?oe:Z,y=de==="element"?Y:Z>oe?Z:oe,P!==y&&(P===0&&y===Y?(l(R,v),R.select(P,y)):(T=R.splitText(P,y),T=P===0?T[0]:T[1],l(T,v),T.select(0,y-P))));else for(e.$isTextNode(R)&&P<R.getTextContentSize()&&(P!==0&&(R=R.splitText(P)[1],P=0,M.set(R.getKey(),P,"text")),l(R,v)),e.$isTextNode(k)&&(P=k.getTextContent().length,k.__key!==X&&y!==0&&(y=P),y!==P&&([k]=k.splitText(y)),y!==0&&l(k,v)),y=1;y<O;y++)P=T[y],M=P.getKey(),e.$isTextNode(P)&&M!==R.getKey()&&M!==k.getKey()&&!P.isToken()&&l(P,v)}}function p(y){for(;y!==null&&!e.$isRootOrShadowRoot(y);){let v=y.getLatest(),T=y.getParent();v.getChildrenSize()===0&&y.remove(!0),y=T}}function g(y,v,T,O,R=null){if(v.length!==0){var k=v[0],P=new Map,M=[];k=e.$isElementNode(k)?k:k.getParentOrThrow(),k.isInline()&&(k=k.getParentOrThrow());for(var Y=!1;k!==null;){var X=k.getPreviousSibling();if(X!==null){k=X,Y=!0;break}if(k=k.getParentOrThrow(),e.$isRootOrShadowRoot(k))break}X=new Set;for(var oe=0;oe<T;oe++){var Z=v[oe];e.$isElementNode(Z)&&Z.getChildrenSize()===0&&X.add(Z.getKey())}var U=new Set;for(oe=0;oe<T;oe++){Z=v[oe];var Q=Z.getParent();if(Q!==null&&Q.isInline()&&(Q=Q.getParent()),Q!==null&&e.$isLeafNode(Z)&&!U.has(Z.getKey())){if(Z=Q.getKey(),P.get(Z)===void 0){let de=O();de.setFormat(Q.getFormatType()),de.setIndent(Q.getIndent()),M.push(de),P.set(Z,de),Q.getChildren().forEach(pe=>{de.append(pe),U.add(pe.getKey()),e.$isElementNode(pe)&&pe.getChildrenKeys().forEach(te=>U.add(te))}),p(Q)}}else X.has(Z.getKey())&&(Q=O(),Q.setFormat(Z.getFormatType()),Q.setIndent(Z.getIndent()),M.push(Q),Z.remove(!0))}if(R!==null)for(v=0;v<M.length;v++)R.append(M[v]);if(v=null,e.$isRootOrShadowRoot(k))if(Y)if(R!==null)k.insertAfter(R);else for(R=M.length-1;0<=R;R--)k.insertAfter(M[R]);else if(Y=k.getFirstChild(),e.$isElementNode(Y)&&(k=Y),Y===null)if(R)k.append(R);else for(R=0;R<M.length;R++)Y=M[R],k.append(Y),v=Y;else if(R!==null)Y.insertBefore(R);else for(k=0;k<M.length;k++)R=M[k],Y.insertBefore(R),v=R;else if(R)k.insertAfter(R);else for(R=M.length-1;0<=R;R--)Y=M[R],k.insertAfter(Y),v=Y;M=e.$getPreviousSelection(),e.$isRangeSelection(M)&&M.anchor.getNode().isAttached()&&M.focus.getNode().isAttached()?e.$setSelection(M.clone()):v!==null?v.selectEnd():y.dirty=!0}}function _(y,v,T,O){y.modify(v?"extend":"move",T,O)}function C(y){return y=y.anchor.getNode(),(e.$isRootNode(y)?y:y.getParentOrThrow()).getDirection()==="rtl"}function b(y){if(e.$isDecoratorNode(y)&&!y.isInline())return!0;if(!e.$isElementNode(y)||e.$isRootOrShadowRoot(y))return!1;var v=y.getFirstChild();return v=v===null||e.$isLineBreakNode(v)||e.$isTextNode(v)||v.isInline(),!y.isInline()&&y.canBeEmpty()!==!1&&v}return ar.$addNodeStyle=function(y){y=y.getStyle();let v=o(y);t.set(y,v)},ar.$cloneWithProperties=function(y){let v=y.constructor.clone(y);return v.__parent=y.__parent,v.__next=y.__next,v.__prev=y.__prev,e.$isElementNode(y)&&e.$isElementNode(v)?(v.__first=y.__first,v.__last=y.__last,v.__size=y.__size,v.__format=y.__format,v.__indent=y.__indent,v.__dir=y.__dir,v):(e.$isTextNode(y)&&e.$isTextNode(v)&&(v.__format=y.__format,v.__style=y.__style,v.__mode=y.__mode,v.__detail=y.__detail),v)},ar.$getSelectionStyleValueForProperty=function(y,v,T=""){let O=null,R=y.getNodes();var k=y.anchor,P=y.focus,M=y.isBackward();let Y=M?P.offset:k.offset;if(k=M?P.getNode():k.getNode(),y.isCollapsed()&&y.style!==""&&(y=i(y.style),y!==null&&v in y))return y[v];for(y=0;y<R.length;y++){var X=R[y];if((y===0||Y!==0||!X.is(k))&&e.$isTextNode(X)){if(P=v,M=T,X=X.getStyle(),X=i(X),P=X!==null&&X[P]||M,O===null)O=P;else if(O!==P){O="";break}}}return O===null?T:O},ar.$isAtNodeEnd=function(y){return y.type==="text"?y.offset===y.getNode().getTextContentSize():y.offset===y.getNode().getChildrenSize()},ar.$isParentElementRTL=C,ar.$moveCaretSelection=_,ar.$moveCharacter=function(y,v,T){let O=C(y);_(y,v,T?!O:O,"character")},ar.$patchStyleText=u,ar.$selectAll=function(y){let v=y.anchor;y=y.focus;var T=v.getNode().getTopLevelElementOrThrow().getParentOrThrow();let O=T.getFirstDescendant();T=T.getLastDescendant();let R="element",k="element",P=0;e.$isTextNode(O)?R="text":e.$isElementNode(O)||O===null||(O=O.getParentOrThrow()),e.$isTextNode(T)?(k="text",P=T.getTextContentSize()):e.$isElementNode(T)||T===null||(T=T.getParentOrThrow()),O&&T&&(v.set(O.getKey(),0,R),y.set(T.getKey(),P,k))},ar.$setBlocksType=function(y,v){if(y.anchor.key==="root"){v=v();var T=e.$getRoot();(y=T.getFirstChild())?y.replace(v,!0):T.append(v)}else{for(T=y.getNodes(),y=y.anchor.getNode();y!==null&&y.getParent()!==null&&!b(y);)y=y.getParentOrThrow();for((y=b(y)?y:null)&&T.indexOf(y)===-1&&T.push(y),y=0;y<T.length;y++){let O=T[y];if(!b(O))continue;let R=v();R.setFormat(O.getFormatType()),R.setIndent(O.getIndent()),O.replace(R,!0)}}},ar.$shouldOverrideDefaultCharacterSelection=function(y,v){return y=e.$getAdjacentNode(y.focus,v),e.$isDecoratorNode(y)&&!y.isIsolated()||e.$isElementNode(y)&&!y.isInline()&&!y.canBeEmpty()},ar.$sliceSelectedTextNodeContent=function(y,v){if(v.isSelected()&&!v.isSegmented()&&!v.isToken()&&e.$INTERNAL_isPointSelection(y)){var T=y.anchor.getNode(),O=y.focus.getNode(),R=v.is(T),k=v.is(O);if(R||k){R=y.isBackward();let[P,M]=y.getCharacterOffsets();y=T.is(O),k=v.is(R?O:T),O=v.is(R?T:O),T=0;let Y;y?(T=P>M?M:P,Y=P>M?P:M):k?(T=R?M:P,Y=void 0):O&&(R=R?P:M,T=0,Y=R),v.__text=v.__text.slice(T,Y)}}return v},ar.$wrapNodes=function(y,v,T=null){var O=y.getNodes();let R=O.length;var k=y.anchor;if(R===0||R===1&&k.type==="element"&&k.getNode().getChildrenSize()===0){y=k.type==="text"?k.getNode().getParentOrThrow():k.getNode(),O=y.getChildren();let M=v();M.setFormat(y.getFormatType()),M.setIndent(y.getIndent()),O.forEach(Y=>M.append(Y)),T&&(M=T.append(M)),y.replace(M)}else{k=null;var P=[];for(let M=0;M<R;M++){let Y=O[M];e.$isRootOrShadowRoot(Y)?(g(y,P,P.length,v,T),P=[],k=Y):k===null||k!==null&&e.$hasAncestor(Y,k)?P.push(Y):(g(y,P,P.length,v,T),P=[Y])}g(y,P,P.length,v,T)}},ar.createDOMRange=function(y,v,T,O,R){let k=v.getKey(),P=O.getKey(),M=document.createRange(),Y=y.getElementByKey(k);if(y=y.getElementByKey(P),e.$isTextNode(v)&&(Y=n(Y)),e.$isTextNode(O)&&(y=n(y)),v===void 0||O===void 0||Y===null||y===null)return null;Y.nodeName==="BR"&&([Y,T]=r(Y)),y.nodeName==="BR"&&([y,R]=r(y)),v=Y.firstChild,Y===y&&v!=null&&v.nodeName==="BR"&&T===0&&R===0&&(R=1);try{M.setStart(Y,T),M.setEnd(y,R)}catch{return null}return!M.collapsed||T===R&&k===P||(M.setStart(y,R),M.setEnd(Y,T)),M},ar.createRectsFromDOMRange=function(y,v){var T=y.getRootElement();if(T===null)return[];y=T.getBoundingClientRect(),T=getComputedStyle(T),T=parseFloat(T.paddingLeft)+parseFloat(T.paddingRight),v=Array.from(v.getClientRects());let O=v.length;v.sort((k,P)=>{let M=k.top-P.top;return 3>=Math.abs(M)?k.left-P.left:M});let R;for(let k=0;k<O;k++){let P=v[k],M=P.width+T===y.width;R&&R.top<=P.top&&R.top+R.height>P.top&&R.left+R.width>P.left||M?(v.splice(k--,1),O--):R=P}return v},ar.getStyleObjectFromCSS=i,ar.trimTextContentFromAnchor=function(y,v,T){let O=v.getNode();if(e.$isElementNode(O)){var R=O.getDescendantByIndex(v.offset);R!==null&&(O=R)}for(;0<T&&O!==null;){e.$isElementNode(O)&&(R=O.getLastDescendant(),R!==null&&(O=R));var k=O.getPreviousSibling(),P=0;if(k===null){R=O.getParentOrThrow();for(var M=R.getPreviousSibling();M===null;){if(R=R.getParent(),R===null){k=null;break}M=R.getPreviousSibling()}R!==null&&(P=R.isInline()?0:2,k=M)}if(M=O.getTextContent(),M===""&&e.$isElementNode(O)&&!O.isInline()&&(M=`
|
|
268
|
+
|
|
269
|
+
`),R=M.length,!e.$isTextNode(O)||T>=R)M=O.getParent(),O.remove(),M==null||M.getChildrenSize()!==0||e.$isRootNode(M)||M.remove(),T-=R+P,O=k;else{let Y=O.getKey();P=y.getEditorState().read(()=>{const oe=e.$getNodeByKey(Y);return e.$isTextNode(oe)&&oe.isSimpleText()?oe.getTextContent():null}),k=R-T;let X=M.slice(0,k);P!==null&&P!==M?(T=e.$getPreviousSelection(),R=O,O.isSimpleText()?O.setTextContent(P):(R=e.$createTextNode(P),O.replace(R)),e.$isRangeSelection(T)&&T.isCollapsed()&&(T=T.anchor.offset,R.select(T,T))):O.isSimpleText()?(P=v.key===Y,M=v.offset,M<T&&(M=R),T=P?M-T:0,R=P?M:k,P&&T===0?([T]=O.splitText(T,R),T.remove()):([,T]=O.splitText(T,R),T.remove())):(T=e.$createTextNode(X),O.replace(T)),T=0}}},ar}var Yb,qb;function za(){return qb||(qb=1,Yb=process.env.NODE_ENV==="development"?e7():t7()),Yb}var Zb;function n7(){if(Zb)return Pn;Zb=1;var e=za(),t=Xt();function n(...X){return()=>{X.forEach(oe=>oe())}}function r(X){return`${X}px`}const o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(X,oe,Z){let U=null,Q=null,de=null,pe=[];const te=document.createElement("div");function fe(){if(U===null)throw Error("Unexpected null rootDOMNode");if(Q===null)throw Error("Unexpected null parentDOMNode");const{left:ne,top:B}=U.getBoundingClientRect(),W=Q,J=e.createRectsFromDOMRange(X,oe);te.isConnected||W.append(te);let F=!1;for(let w=0;w<J.length;w++){const N=J[w],I=pe[w]||document.createElement("div"),q=I.style;q.position!=="absolute"&&(q.position="absolute",F=!0);const ue=r(N.left-ne);q.left!==ue&&(q.left=ue,F=!0);const he=r(N.top-B);q.top!==he&&(I.style.top=he,F=!0);const se=r(N.width);q.width!==se&&(I.style.width=se,F=!0);const Ce=r(N.height);q.height!==Ce&&(I.style.height=Ce,F=!0),I.parentNode!==te&&(te.append(I),F=!0),pe[w]=I}for(;pe.length>J.length;)pe.pop();F&&Z(pe)}function V(){Q=null,U=null,de!==null&&de.disconnect(),de=null,te.remove();for(const ne of pe)ne.remove();pe=[]}function j(){const ne=X.getRootElement();if(ne===null)return V();const B=ne.parentElement;if(!(B instanceof HTMLElement))return V();V(),U=ne,Q=B,de=new MutationObserver(W=>{const J=X.getRootElement(),F=J&&J.parentElement;if(J!==U||F!==Q)return j();for(const w of W)if(!te.contains(w.target))return fe()}),de.observe(B,o),fe()}const ee=X.registerRootListener(j);return()=>{ee(),V()}}function a(X,oe){let Z=null,U=null,Q=null,de=null,pe=()=>{};function te(fe){fe.read(()=>{const V=t.$getSelection();if(!t.$isRangeSelection(V)){Z=null,U=null,Q=null,de=null,pe(),pe=()=>{};return}const{anchor:j,focus:ee}=V,ne=j.getNode(),B=ne.getKey(),W=j.offset,J=ee.getNode(),F=J.getKey(),w=ee.offset,N=X.getElementByKey(B),I=X.getElementByKey(F),q=Z===null||N===null||W!==U||B!==Z.getKey()||ne!==Z&&(!(Z instanceof t.TextNode)||ne.updateDOM(Z,N,X._config)),ue=Q===null||I===null||w!==de||F!==Q.getKey()||J!==Q&&(!(Q instanceof t.TextNode)||J.updateDOM(Q,I,X._config));if(q||ue){const he=X.getElementByKey(j.getNode().getKey()),se=X.getElementByKey(ee.getNode().getKey());if(he!==null&&se!==null&&he.tagName==="SPAN"&&se.tagName==="SPAN"){const Ce=document.createRange();let Oe,Be,ce,le;ee.isBefore(j)?(Oe=se,Be=ee.offset,ce=he,le=j.offset):(Oe=he,Be=j.offset,ce=se,le=ee.offset);const ve=Oe.firstChild;if(ve===null)throw Error("Expected text node to be first child of span");const Me=ce.firstChild;if(Me===null)throw Error("Expected text node to be first child of span");Ce.setStart(ve,Be),Ce.setEnd(Me,le),pe(),pe=i(X,Ce,Pe=>{for(const We of Pe){const Xe=We.style;Xe.background!=="Highlight"&&(Xe.background="Highlight"),Xe.color!=="HighlightText"&&(Xe.color="HighlightText"),Xe.zIndex!=="-1"&&(Xe.zIndex="-1"),Xe.pointerEvents!=="none"&&(Xe.pointerEvents="none"),Xe.marginTop!==r(-1.5)&&(Xe.marginTop=r(-1.5)),Xe.paddingTop!==r(4)&&(Xe.paddingTop=r(4)),Xe.paddingBottom!==r(0)&&(Xe.paddingBottom=r(0))}oe!==void 0&&oe(Pe)})}}Z=ne,U=W,Q=J,de=w})}return te(X.getEditorState()),n(X.registerUpdateListener(({editorState:fe})=>te(fe)),pe,()=>{pe()})}function l(X,...oe){oe.forEach(Z=>{if(typeof Z=="string"){const U=Z.split(" ").filter(Q=>Q!=="");X.classList.add(...U)}})}function u(X,...oe){oe.forEach(Z=>{typeof Z=="string"&&X.classList.remove(...Z.split(" "))})}function p(X,oe){for(const Z of oe)if(X.type.startsWith(Z))return!0;return!1}function g(X,oe){const Z=X[Symbol.iterator]();return new Promise((U,Q)=>{const de=[],pe=()=>{const{done:te,value:fe}=Z.next();if(te)return U(de);const V=new FileReader;V.addEventListener("error",Q),V.addEventListener("load",()=>{const j=V.result;typeof j=="string"&&de.push({file:fe,result:j}),pe()}),p(fe,oe)?V.readAsDataURL(fe):pe()};pe()})}function _(X,oe){const Z=[],U=(X||t.$getRoot()).getLatest(),Q=oe||(t.$isElementNode(U)?U.getLastDescendant():U);let de=U,pe=C(de);for(;de!==null&&!de.is(Q);)if(Z.push({depth:pe,node:de}),t.$isElementNode(de)&&de.getChildrenSize()>0)de=de.getFirstChild(),pe++;else{let te=null;for(;te===null&&de!==null;)te=de.getNextSibling(),te===null?(de=de.getParent(),pe--):de=te}return de!==null&&de.is(Q)&&Z.push({depth:pe,node:de}),Z}function C(X){let oe=X,Z=0;for(;(oe=oe.getParent())!==null;)Z++;return Z}function b(X,oe){let Z=X;for(;Z!=null;){if(Z instanceof oe)return Z;Z=Z.getParent()}return null}function y(X){const oe=v(X,Z=>t.$isElementNode(Z)&&!Z.isInline());if(!t.$isElementNode(oe))throw Error(`Expected node ${X.__key} to have closest block element node.`);return oe}function v(X,oe){let Z=X;for(;Z!==t.$getRoot()&&Z!=null;){if(oe(Z))return Z;Z=Z.getParent()}return null}function T(X,oe,Z,U){const Q=te=>te instanceof oe,de=te=>{const fe=te.getChildren();for(let ee=0;ee<fe.length;ee++){const ne=fe[ee];if(Q(ne))return null}let V=te,j=te;for(;V!==null;)if(j=V,V=V.getParent(),Q(V))return{child:j,parent:V};return null},pe=te=>{const fe=de(te);if(fe!==null){const{child:V,parent:j}=fe;if(V.is(te)){U(j,te);const ee=V.getNextSiblings(),ne=ee.length;if(j.insertAfter(V),ne!==0){const B=Z(j);V.insertAfter(B);for(let W=0;W<ne;W++)B.append(ee[W])}!j.canBeEmpty()&&j.getChildrenSize()===0&&j.remove()}}};return X.registerNodeTransform(oe,pe)}function O(X,oe){const Z=new Map,U=X._pendingEditorState;for(const[de,pe]of oe._nodeMap){const te=e.$cloneWithProperties(pe);t.$isTextNode(te)&&(te.__text=pe.__text),Z.set(de,te)}U&&(U._nodeMap=Z),X._dirtyType=2;const Q=oe._selection;t.$setSelection(Q===null?null:Q.clone())}function R(X){const oe=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(oe)){const{focus:Z}=oe,U=Z.getNode(),Q=Z.offset;if(t.$isRootOrShadowRoot(U)){const de=U.getChildAtIndex(Q);de==null?U.append(X):de.insertBefore(X),X.selectNext()}else{let de,pe;t.$isTextNode(U)?(de=U.getParentOrThrow(),pe=U.getIndexWithinParent(),Q>0&&(pe+=1,U.splitText(Q))):(de=U,pe=Q);const[,te]=t.$splitNode(de,pe);te.insertBefore(X),te.selectStart()}}else{if(oe!=null){const U=oe.getNodes();U[U.length-1].getTopLevelElementOrThrow().insertAfter(X)}else t.$getRoot().append(X);const Z=t.$createParagraphNode();X.insertAfter(Z),Z.select()}return X.getLatest()}function k(X,oe){const Z=oe();return X.replace(Z),Z.append(X),Z}function P(X,oe){return X!==null?Object.getPrototypeOf(X).constructor.name===oe.name:!1}function M(X,oe){const Z=[];for(let U=0;U<X.length;U++){const Q=oe(X[U]);Q!==null&&Z.push(Q)}return Z}function Y(X,oe){const Z=X.getFirstChild();Z!==null?Z.insertBefore(oe):X.append(oe)}return Pn.$splitNode=t.$splitNode,Pn.isHTMLAnchorElement=t.isHTMLAnchorElement,Pn.isHTMLElement=t.isHTMLElement,Pn.$dfs=_,Pn.$filter=M,Pn.$findMatchingParent=v,Pn.$getNearestBlockElementAncestorOrThrow=y,Pn.$getNearestNodeOfType=b,Pn.$insertFirst=Y,Pn.$insertNodeToNearestRoot=R,Pn.$restoreEditorState=O,Pn.$wrapNodeInElement=k,Pn.addClassNamesToElement=l,Pn.isMimeType=p,Pn.markSelection=a,Pn.mediaFileReader=g,Pn.mergeRegister=n,Pn.objectKlassEquals=P,Pn.positionNodeOnRange=i,Pn.registerNestedElementResolver=T,Pn.removeClassNamesFromElement=u,Pn}var In={},Jb;function r7(){if(Jb)return In;Jb=1;var e=za(),t=Xt();function n(u){let p=new URLSearchParams;p.append("code",u);for(let g=1;g<arguments.length;g++)p.append("v",arguments[g]);throw Error(`Minified Lexical error #${u}; visit https://lexical.dev/docs/error?${p} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(...u){return()=>{u.forEach(p=>p())}}let o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(u,p,g){function _(){if(y===null)throw Error("Unexpected null rootDOMNode");if(v===null)throw Error("Unexpected null parentDOMNode");let{left:P,top:M}=y.getBoundingClientRect();var Y=v;let X=e.createRectsFromDOMRange(u,p);R.isConnected||Y.append(R),Y=!1;for(let U=0;U<X.length;U++){var oe=X[U];let Q=O[U]||document.createElement("div"),de=Q.style;de.position!=="absolute"&&(de.position="absolute",Y=!0);var Z=`${oe.left-P}px`;de.left!==Z&&(de.left=Z,Y=!0),Z=`${oe.top-M}px`,de.top!==Z&&(Q.style.top=Z,Y=!0),Z=`${oe.width}px`,de.width!==Z&&(Q.style.width=Z,Y=!0),oe=`${oe.height}px`,de.height!==oe&&(Q.style.height=oe,Y=!0),Q.parentNode!==R&&(R.append(Q),Y=!0),O[U]=Q}for(;O.length>X.length;)O.pop();Y&&g(O)}function C(){y=v=null,T!==null&&T.disconnect(),T=null,R.remove();for(let P of O)P.remove();O=[]}function b(){let P=u.getRootElement();if(P===null)return C();let M=P.parentElement;if(!(M instanceof HTMLElement))return C();C(),y=P,v=M,T=new MutationObserver(Y=>{let X=u.getRootElement(),oe=X&&X.parentElement;if(X!==y||oe!==v)return b();for(let Z of Y)if(!R.contains(Z.target))return _()}),T.observe(M,o),_()}let y=null,v=null,T=null,O=[],R=document.createElement("div"),k=u.registerRootListener(b);return()=>{k(),C()}}function a(u,p){for(let g of p)if(u.type.startsWith(g))return!0;return!1}function l(u,p){for(;u!==t.$getRoot()&&u!=null;){if(p(u))return u;u=u.getParent()}return null}return In.$splitNode=t.$splitNode,In.isHTMLAnchorElement=t.isHTMLAnchorElement,In.isHTMLElement=t.isHTMLElement,In.$dfs=function(u,p){let g=[];u=(u||t.$getRoot()).getLatest(),p=p||(t.$isElementNode(u)?u.getLastDescendant():u);for(var _=u,C=0;(_=_.getParent())!==null;)C++;for(_=C;u!==null&&!u.is(p);)if(g.push({depth:_,node:u}),t.$isElementNode(u)&&0<u.getChildrenSize())u=u.getFirstChild(),_++;else for(C=null;C===null&&u!==null;)C=u.getNextSibling(),C===null?(u=u.getParent(),_--):u=C;return u!==null&&u.is(p)&&g.push({depth:_,node:u}),g},In.$filter=function(u,p){let g=[];for(let _=0;_<u.length;_++){let C=p(u[_]);C!==null&&g.push(C)}return g},In.$findMatchingParent=l,In.$getNearestBlockElementAncestorOrThrow=function(u){let p=l(u,g=>t.$isElementNode(g)&&!g.isInline());return t.$isElementNode(p)||n(4,u.__key),p},In.$getNearestNodeOfType=function(u,p){for(;u!=null;){if(u instanceof p)return u;u=u.getParent()}return null},In.$insertFirst=function(u,p){let g=u.getFirstChild();g!==null?g.insertBefore(p):u.append(p)},In.$insertNodeToNearestRoot=function(u){var p=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(p)){var{focus:g}=p;if(p=g.getNode(),g=g.offset,t.$isRootOrShadowRoot(p))g=p.getChildAtIndex(g),g==null?p.append(u):g.insertBefore(u),u.selectNext();else{let _,C;t.$isTextNode(p)?(_=p.getParentOrThrow(),C=p.getIndexWithinParent(),0<g&&(C+=1,p.splitText(g))):(_=p,C=g),[,p]=t.$splitNode(_,C),p.insertBefore(u),p.selectStart()}}else p!=null?(p=p.getNodes(),p[p.length-1].getTopLevelElementOrThrow().insertAfter(u)):t.$getRoot().append(u),p=t.$createParagraphNode(),u.insertAfter(p),p.select();return u.getLatest()},In.$restoreEditorState=function(u,p){let g=new Map,_=u._pendingEditorState;for(let[C,b]of p._nodeMap){let y=e.$cloneWithProperties(b);t.$isTextNode(y)&&(y.__text=b.__text),g.set(C,y)}_&&(_._nodeMap=g),u._dirtyType=2,u=p._selection,t.$setSelection(u===null?null:u.clone())},In.$wrapNodeInElement=function(u,p){return p=p(),u.replace(p),p.append(u),p},In.addClassNamesToElement=function(u,...p){p.forEach(g=>{typeof g=="string"&&(g=g.split(" ").filter(_=>_!==""),u.classList.add(...g))})},In.isMimeType=a,In.markSelection=function(u,p){function g(T){T.read(()=>{var O=t.$getSelection();if(t.$isRangeSelection(O)){var{anchor:R,focus:k}=O;O=R.getNode();var P=O.getKey(),M=R.offset,Y=k.getNode(),X=Y.getKey(),oe=k.offset,Z=u.getElementByKey(P),U=u.getElementByKey(X);if(P=_===null||Z===null||M!==C||P!==_.getKey()||O!==_&&(!(_ instanceof t.TextNode)||O.updateDOM(_,Z,u._config)),X=b===null||U===null||oe!==y||X!==b.getKey()||Y!==b&&(!(b instanceof t.TextNode)||Y.updateDOM(b,U,u._config)),P||X){Z=u.getElementByKey(R.getNode().getKey());var Q=u.getElementByKey(k.getNode().getKey());if(Z!==null&&Q!==null&&Z.tagName==="SPAN"&&Q.tagName==="SPAN"){if(X=document.createRange(),k.isBefore(R)?(P=Q,U=k.offset,Q=Z,Z=R.offset):(P=Z,U=R.offset,Z=k.offset),P=P.firstChild,P===null||(Q=Q.firstChild,Q===null))throw Error("Expected text node to be first child of span");X.setStart(P,U),X.setEnd(Q,Z),v(),v=i(u,X,de=>{for(let pe of de){let te=pe.style;te.background!=="Highlight"&&(te.background="Highlight"),te.color!=="HighlightText"&&(te.color="HighlightText"),te.zIndex!=="-1"&&(te.zIndex="-1"),te.pointerEvents!=="none"&&(te.pointerEvents="none"),te.marginTop!=="-1.5px"&&(te.marginTop="-1.5px"),te.paddingTop!=="4px"&&(te.paddingTop="4px"),te.paddingBottom!=="0px"&&(te.paddingBottom="0px")}p!==void 0&&p(de)})}}_=O,C=M,b=Y,y=oe}else y=b=C=_=null,v(),v=()=>{}})}let _=null,C=null,b=null,y=null,v=()=>{};return g(u.getEditorState()),r(u.registerUpdateListener(({editorState:T})=>g(T)),v,()=>{v()})},In.mediaFileReader=function(u,p){let g=u[Symbol.iterator]();return new Promise((_,C)=>{let b=[],y=()=>{const{done:v,value:T}=g.next();if(v)return _(b);const O=new FileReader;O.addEventListener("error",C),O.addEventListener("load",()=>{const R=O.result;typeof R=="string"&&b.push({file:T,result:R}),y()}),a(T,p)?O.readAsDataURL(T):y()};y()})},In.mergeRegister=r,In.objectKlassEquals=function(u,p){return u!==null?Object.getPrototypeOf(u).constructor.name===p.name:!1},In.positionNodeOnRange=i,In.registerNestedElementResolver=function(u,p,g,_){return u.registerNodeTransform(p,C=>{e:{for(var b=C.getChildren(),y=0;y<b.length;y++)if(b[y]instanceof p){b=null;break e}for(b=C;b!==null;)if(y=b,b=b.getParent(),b instanceof p){b={child:y,parent:b};break e}b=null}if(b!==null){const{child:v,parent:T}=b;if(v.is(C)){if(_(T,C),C=v.getNextSiblings(),b=C.length,T.insertAfter(v),b!==0){y=g(T),v.insertAfter(y);for(let O=0;O<b;O++)y.append(C[O])}T.canBeEmpty()||T.getChildrenSize()!==0||T.remove()}}})},In.removeClassNamesFromElement=function(u,...p){p.forEach(g=>{typeof g=="string"&&u.classList.remove(...g.split(" "))})},In}var Xb,Qb;function vn(){return Qb||(Qb=1,Xb=process.env.NODE_ENV==="development"?n7():r7()),Xb}var pp={},e_;function o7(){if(e_)return pp;e_=1;var e=Xt();function t(n){const r=window.location.origin,o=i=>{if(i.origin!==r)return;const a=n.getRootElement();if(document.activeElement!==a)return;const l=i.data;if(typeof l=="string"){let u;try{u=JSON.parse(l)}catch{return}if(u&&u.protocol==="nuanria_messaging"&&u.type==="request"){const p=u.payload;if(p&&p.functionId==="makeChanges"){const g=p.args;if(g){const[_,C,b,y,v,T]=g;n.update(()=>{const O=e.$getSelection();if(e.$isRangeSelection(O)){const R=O.anchor;let k=R.getNode(),P=0,M=0;if(e.$isTextNode(k)&&_>=0&&C>=0&&(P=_,M=_+C,O.setTextNodeRange(k,P,k,M)),(P!==M||b!=="")&&(O.insertRawText(b),k=R.getNode()),e.$isTextNode(k)){P=y,M=y+v;const Y=k.getTextContentSize();P=P>Y?Y:P,M=M>Y?Y:M,O.setTextNodeRange(k,P,k,M)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",o,!0),()=>{window.removeEventListener("message",o,!0)}}return pp.registerDragonSupport=t,pp}var gp={},t_;function i7(){if(t_)return gp;t_=1;var e=Xt();return gp.registerDragonSupport=function(t){let n=window.location.origin,r=o=>{if(o.origin===n){var i=t.getRootElement();if(document.activeElement===i&&(i=o.data,typeof i=="string")){try{var a=JSON.parse(i)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"&&(a=a.payload)&&a.functionId==="makeChanges"&&(a=a.args)){const[l,u,p,g,_]=a;t.update(()=>{const C=e.$getSelection();if(e.$isRangeSelection(C)){var b=C.anchor;let y=b.getNode(),v=0,T=0;e.$isTextNode(y)&&0<=l&&0<=u&&(v=l,T=l+u,C.setTextNodeRange(y,v,y,T)),(v!==T||p!=="")&&(C.insertRawText(p),y=b.getNode()),e.$isTextNode(y)&&(v=g,T=g+_,b=y.getTextContentSize(),v=v>b?b:v,T=T>b?b:T,C.setTextNodeRange(y,v,y,T)),o.stopImmediatePropagation()}})}}}};return window.addEventListener("message",r,!0),()=>{window.removeEventListener("message",r,!0)}},gp}var n_,r_;function TN(){return r_||(r_=1,n_=process.env.NODE_ENV==="development"?o7():i7()),n_}var Io={},fi={},Bd={},o_;function a7(){if(o_)return Bd;o_=1;var e=za(),t=vn(),n=Xt();function r(p,g){const _=g.body?g.body.childNodes:[];let C=[];for(let b=0;b<_.length;b++){const y=_[b];if(!l.has(y.nodeName)){const v=u(y,p);v!==null&&(C=C.concat(v))}}return C}function o(p,g){if(typeof document>"u"||typeof window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const _=document.createElement("div"),C=n.$getRoot().getChildren();for(let b=0;b<C.length;b++){const y=C[b];i(p,y,_,g)}return _.innerHTML}function i(p,g,_,C=null){let b=C!=null?g.isSelected(C):!0;const y=n.$isElementNode(g)&&g.excludeFromCopy("html");let v=g;if(C!==null){let Y=e.$cloneWithProperties(g);Y=n.$isTextNode(Y)&&C!=null?e.$sliceSelectedTextNodeContent(C,Y):Y,v=Y}const T=n.$isElementNode(v)?v.getChildren():[],O=p._nodes.get(v.getType());let R;O&&O.exportDOM!==void 0?R=O.exportDOM(p,v):R=v.exportDOM(p);const{element:k,after:P}=R;if(!k)return!1;const M=document.createDocumentFragment();for(let Y=0;Y<T.length;Y++){const X=T[Y],oe=i(p,X,M,C);!b&&n.$isElementNode(g)&&oe&&g.extractWithChild(X,C,"html")&&(b=!0)}if(b&&!y){if(t.isHTMLElement(k)&&k.append(M),_.append(k),P){const Y=P.call(v,k);Y&&k.replaceWith(Y)}}else _.append(M);return b}function a(p,g){const{nodeName:_}=p,C=g._htmlConversions.get(_.toLowerCase());let b=null;if(C!==void 0)for(const y of C){const v=y(p);v!==null&&(b===null||b.priority<v.priority)&&(b=v)}return b!==null?b.conversion:null}const l=new Set(["STYLE","SCRIPT"]);function u(p,g,_=new Map,C){let b=[];if(l.has(p.nodeName))return b;let y=null;const v=a(p,g),T=v?v(p):null;let O=null;if(T!==null){O=T.after;const P=T.node;if(y=Array.isArray(P)?P[P.length-1]:P,y!==null){for(const[,M]of _)if(y=M(y,C),!y)break;y&&b.push(...Array.isArray(P)?P:[y])}T.forChild!=null&&_.set(p.nodeName,T.forChild)}const R=p.childNodes;let k=[];for(let P=0;P<R.length;P++)k.push(...u(R[P],g,new Map(_),y));return O!=null&&(k=O(k)),y==null?b=b.concat(k):n.$isElementNode(y)&&y.append(...k),b}return Bd.$generateHtmlFromNodes=o,Bd.$generateNodesFromDOM=r,Bd}var Wd={},i_;function s7(){if(i_)return Wd;i_=1;var e=za(),t=vn(),n=Xt();function r(a,l,u,p=null){let g=p!=null?l.isSelected(p):!0,_=n.$isElementNode(l)&&l.excludeFromCopy("html");var C=l;p!==null&&(C=e.$cloneWithProperties(l),C=n.$isTextNode(C)&&p!=null?e.$sliceSelectedTextNodeContent(p,C):C);let b=n.$isElementNode(C)?C.getChildren():[];var y=a._nodes.get(C.getType());y=y&&y.exportDOM!==void 0?y.exportDOM(a,C):C.exportDOM(a);let{element:v,after:T}=y;if(!v)return!1;y=document.createDocumentFragment();for(let O=0;O<b.length;O++){let R=b[O],k=r(a,R,y,p);!g&&n.$isElementNode(l)&&k&&l.extractWithChild(R,p,"html")&&(g=!0)}return g&&!_?(t.isHTMLElement(v)&&v.append(y),u.append(v),T&&(a=T.call(C,v))&&v.replaceWith(a)):u.append(y),g}let o=new Set(["STYLE","SCRIPT"]);function i(a,l,u=new Map,p){let g=[];if(o.has(a.nodeName))return g;let _=null;var C,{nodeName:b}=a,y=l._htmlConversions.get(b.toLowerCase());if(b=null,y!==void 0)for(C of y)y=C(a),y!==null&&(b===null||b.priority<y.priority)&&(b=y);if(b=(C=b!==null?b.conversion:null)?C(a):null,C=null,b!==null){if(C=b.after,y=b.node,_=Array.isArray(y)?y[y.length-1]:y,_!==null){for(var[,v]of u)if(_=v(_,p),!_)break;_&&g.push(...Array.isArray(y)?y:[_])}b.forChild!=null&&u.set(a.nodeName,b.forChild)}for(a=a.childNodes,p=[],v=0;v<a.length;v++)p.push(...i(a[v],l,new Map(u),_));return C!=null&&(p=C(p)),_==null?g=g.concat(p):n.$isElementNode(_)&&_.append(...p),g}return Wd.$generateHtmlFromNodes=function(a,l){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let u=document.createElement("div"),p=n.$getRoot().getChildren();for(let g=0;g<p.length;g++)r(a,p[g],u,l);return u.innerHTML},Wd.$generateNodesFromDOM=function(a,l){l=l.body?l.body.childNodes:[];let u=[];for(let g=0;g<l.length;g++){var p=l[g];o.has(p.nodeName)||(p=i(p,a),p!==null&&(u=u.concat(p)))}return u},Wd}var a_,s_;function NN(){return s_||(s_=1,a_=process.env.NODE_ENV==="development"?a7():s7()),a_}var l_;function l7(){if(l_)return fi;l_=1;var e=NN(),t=za(),n=vn(),r=Xt();const o=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",i=P=>o?(P||window).getSelection():null;function a(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?"":e.$generateHtmlFromNodes(P,M)}function l(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?null:JSON.stringify(y(P,M))}function u(P,M){const Y=P.getData("text/plain")||P.getData("text/uri-list");Y!=null&&M.insertRawText(Y)}function p(P,M,Y){const X=P.getData("application/x-lexical-editor");if(X)try{const U=JSON.parse(X);if(U.namespace===Y._config.namespace&&Array.isArray(U.nodes)){const Q=v(U.nodes);return g(Y,Q,M)}}catch{}const oe=P.getData("text/html");if(oe)try{const U=new DOMParser().parseFromString(oe,"text/html"),Q=e.$generateNodesFromDOM(Y,U);return g(Y,Q,M)}catch{}const Z=P.getData("text/plain")||P.getData("text/uri-list");if(Z!=null)if(r.$isRangeSelection(M)){const U=Z.split(/(\r?\n|\t)/);U[U.length-1]===""&&U.pop();for(let Q=0;Q<U.length;Q++){const de=U[Q];de===`
|
|
270
|
+
`||de===`\r
|
|
271
|
+
`?M.insertParagraph():de===" "?M.insertNodes([r.$createTabNode()]):M.insertText(de)}}else M.insertRawText(Z)}function g(P,M,Y){const X=r.DEPRECATED_$isGridSelection(Y),oe=r.$isRangeSelection(Y);if((X||oe&&n.$findMatchingParent(Y.anchor.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null&&n.$findMatchingParent(Y.focus.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null)&&M.length===1&&r.DEPRECATED_$isGridNode(M[0])){_(M,Y,!1,P);return}Y.insertNodes(M)}function _(P,M,Y,X){if(P.length!==1||!r.DEPRECATED_$isGridNode(P[0]))throw Error("$mergeGridNodesStrategy: Expected Grid insertion.");const oe=P[0],Z=oe.getChildren(),U=oe.getFirstChildOrThrow().getChildrenSize(),Q=oe.getChildrenSize(),de=n.$findMatchingParent(M.anchor.getNode(),q=>r.DEPRECATED_$isGridCellNode(q)),pe=de&&n.$findMatchingParent(de,q=>r.DEPRECATED_$isGridRowNode(q)),te=pe&&n.$findMatchingParent(pe,q=>r.DEPRECATED_$isGridNode(q));if(!r.DEPRECATED_$isGridCellNode(de)||!r.DEPRECATED_$isGridRowNode(pe)||!r.DEPRECATED_$isGridNode(te))throw Error("$mergeGridNodesStrategy: Expected selection to be inside of a Grid.");const fe=pe.getIndexWithinParent(),V=Math.min(te.getChildrenSize()-1,fe+Q-1),j=de.getIndexWithinParent(),ee=Math.min(pe.getChildrenSize()-1,j+U-1),ne=Math.min(j,ee),B=Math.min(fe,V),W=Math.max(j,ee),J=Math.max(fe,V),F=te.getChildren();let w=0,N,I;for(let q=B;q<=J;q++){const ue=F[q];if(!r.DEPRECATED_$isGridRowNode(ue))throw Error("getNodes: expected to find GridRowNode");const he=Z[w];if(!r.DEPRECATED_$isGridRowNode(he))throw Error("getNodes: expected to find GridRowNode");const se=ue.getChildren(),Ce=he.getChildren();let Oe=0;for(let Be=ne;Be<=W;Be++){const ce=se[Be];if(!r.DEPRECATED_$isGridCellNode(ce))throw Error("getNodes: expected to find GridCellNode");const le=Ce[Oe];if(!r.DEPRECATED_$isGridCellNode(le))throw Error("getNodes: expected to find GridCellNode");q===B&&Be===ne?N=ce.getKey():q===J&&Be===W&&(I=ce.getKey());const ve=ce.getChildren();le.getChildren().forEach(Me=>{r.$isTextNode(Me)&&r.$createParagraphNode().append(Me),ce.append(Me)}),ve.forEach(Me=>Me.remove()),Oe++}w++}if(N&&I){const q=r.DEPRECATED_$createGridSelection();q.set(te.getKey(),N,I),r.$setSelection(q),X.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}}function C(P){const M=P.exportJSON(),Y=P.constructor;if(M.type!==Y.getType())throw Error(`LexicalNode: Node ${Y.name} does not implement .exportJSON().`);const X=M.children;if(r.$isElementNode(P)&&!Array.isArray(X))throw Error(`LexicalNode: Node ${Y.name} is an element but .exportJSON() does not have a children array.`);return M}function b(P,M,Y,X=[]){let oe=M!=null?Y.isSelected(M):!0;const Z=r.$isElementNode(Y)&&Y.excludeFromCopy("html");let U=Y;if(M!==null){let pe=t.$cloneWithProperties(Y);pe=r.$isTextNode(pe)&&M!=null?t.$sliceSelectedTextNodeContent(M,pe):pe,U=pe}const Q=r.$isElementNode(U)?U.getChildren():[],de=C(U);if(r.$isTextNode(U)){const pe=U.__text;pe.length>0?de.text=pe:oe=!1}for(let pe=0;pe<Q.length;pe++){const te=Q[pe],fe=b(P,M,te,de.children);!oe&&r.$isElementNode(Y)&&fe&&Y.extractWithChild(te,M,"clone")&&(oe=!0)}if(oe&&!Z)X.push(de);else if(Array.isArray(de.children))for(let pe=0;pe<de.children.length;pe++){const te=de.children[pe];X.push(te)}return oe}function y(P,M){const Y=[],X=r.$getRoot().getChildren();for(let oe=0;oe<X.length;oe++){const Z=X[oe];b(P,M,Z,Y)}return{namespace:P._config.namespace,nodes:Y}}function v(P){const M=[];for(let Y=0;Y<P.length;Y++){const X=P[Y],oe=r.$parseSerializedNode(X);r.$isTextNode(oe)&&t.$addNodeStyle(oe),M.push(oe)}return M}const T=50;let O=null;async function R(P,M){if(O!==null)return!1;if(M!==null)return new Promise((Q,de)=>{P.update(()=>{Q(k(P,M))})});const Y=P.getRootElement(),X=P._window==null?window.document:P._window.document,oe=i(P._window);if(Y===null||oe===null)return!1;const Z=X.createElement("span");Z.style.cssText="position: fixed; top: -1000px;",Z.append(X.createTextNode("#")),Y.append(Z);const U=new Range;return U.setStart(Z,0),U.setEnd(Z,1),oe.removeAllRanges(),oe.addRange(U),new Promise((Q,de)=>{const pe=P.registerCommand(r.COPY_COMMAND,te=>(n.objectKlassEquals(te,ClipboardEvent)&&(pe(),O!==null&&(window.clearTimeout(O),O=null),Q(k(P,te))),!0),r.COMMAND_PRIORITY_CRITICAL);O=window.setTimeout(()=>{pe(),O=null,Q(!1)},T),X.execCommand("copy"),Z.remove()})}function k(P,M){const Y=i(P._window);if(!Y)return!1;const X=Y.anchorNode,oe=Y.focusNode;if(X!==null&&oe!==null&&!r.isSelectionWithinEditor(P,X,oe))return!1;M.preventDefault();const Z=M.clipboardData,U=r.$getSelection();if(Z===null||U===null)return!1;const Q=a(P),de=l(P);let pe="";return U!==null&&(pe=U.getTextContent()),Q!==null&&Z.setData("text/html",Q),de!==null&&Z.setData("application/x-lexical-editor",de),Z.setData("text/plain",pe),!0}return fi.$generateJSONFromSelectedNodes=y,fi.$generateNodesFromSerializedNodes=v,fi.$getHtmlContent=a,fi.$getLexicalContent=l,fi.$insertDataTransferForPlainText=u,fi.$insertDataTransferForRichText=p,fi.$insertGeneratedNodes=g,fi.copyToClipboard=R,fi}var hi={},c_;function c7(){if(c_)return hi;c_=1;var e=NN(),t=za(),n=vn(),r=Xt();function o(v){let T=new URLSearchParams;T.append("code",v);for(let O=1;O<arguments.length;O++)T.append("v",arguments[O]);throw Error(`Minified Lexical error #${v}; visit https://lexical.dev/docs/error?${T} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(v){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?"":e.$generateHtmlFromNodes(v,T)}function l(v){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?null:JSON.stringify(_(v,T))}function u(v,T,O){let R=r.DEPRECATED_$isGridSelection(O),k=r.$isRangeSelection(O);(R||k&&n.$findMatchingParent(O.anchor.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null&&n.$findMatchingParent(O.focus.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null)&&T.length===1&&r.DEPRECATED_$isGridNode(T[0])?p(T,O,!1,v):O.insertNodes(T)}function p(v,T,O,R){v.length===1&&r.DEPRECATED_$isGridNode(v[0])||o(42);var k=v[0];v=k.getChildren(),O=k.getFirstChildOrThrow().getChildrenSize();var P=k.getChildrenSize(),M=n.$findMatchingParent(T.anchor.getNode(),de=>r.DEPRECATED_$isGridCellNode(de));T=(k=M&&n.$findMatchingParent(M,de=>r.DEPRECATED_$isGridRowNode(de)))&&n.$findMatchingParent(k,de=>r.DEPRECATED_$isGridNode(de)),r.DEPRECATED_$isGridCellNode(M)&&r.DEPRECATED_$isGridRowNode(k)&&r.DEPRECATED_$isGridNode(T)||o(43);var Y=k.getIndexWithinParent(),X=Math.min(T.getChildrenSize()-1,Y+P-1);P=M.getIndexWithinParent(),M=Math.min(k.getChildrenSize()-1,P+O-1),O=Math.min(P,M),k=Math.min(Y,X),P=Math.max(P,M),Y=Math.max(Y,X),X=T.getChildren(),M=0;let oe,Z;for(let de=k;de<=Y;de++){var U=X[de];r.DEPRECATED_$isGridRowNode(U)||o(24);var Q=v[M];r.DEPRECATED_$isGridRowNode(Q)||o(24),U=U.getChildren(),Q=Q.getChildren();let pe=0;for(let te=O;te<=P;te++){let fe=U[te];r.DEPRECATED_$isGridCellNode(fe)||o(25);let V=Q[pe];r.DEPRECATED_$isGridCellNode(V)||o(25),de===k&&te===O?oe=fe.getKey():de===Y&&te===P&&(Z=fe.getKey());let j=fe.getChildren();V.getChildren().forEach(ee=>{r.$isTextNode(ee)&&r.$createParagraphNode().append(ee),fe.append(ee)}),j.forEach(ee=>ee.remove()),pe++}M++}oe&&Z&&(v=r.DEPRECATED_$createGridSelection(),v.set(T.getKey(),oe,Z),r.$setSelection(v),R.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}function g(v,T,O,R=[]){let k=T!=null?O.isSelected(T):!0,P=r.$isElementNode(O)&&O.excludeFromCopy("html");var M=O;if(T!==null){var Y=t.$cloneWithProperties(O);M=Y=r.$isTextNode(Y)&&T!=null?t.$sliceSelectedTextNodeContent(T,Y):Y}let X=r.$isElementNode(M)?M.getChildren():[];var oe=M;Y=oe.exportJSON();var Z=oe.constructor;Y.type!==Z.getType()&&o(58,Z.name);let U=Y.children;for(r.$isElementNode(oe)&&(Array.isArray(U)||o(59,Z.name)),r.$isTextNode(M)&&(M=M.__text,0<M.length?Y.text=M:k=!1),M=0;M<X.length;M++)oe=X[M],Z=g(v,T,oe,Y.children),!k&&r.$isElementNode(O)&&Z&&O.extractWithChild(oe,T,"clone")&&(k=!0);if(k&&!P)R.push(Y);else if(Array.isArray(Y.children))for(v=0;v<Y.children.length;v++)R.push(Y.children[v]);return k}function _(v,T){let O=[],R=r.$getRoot().getChildren();for(let k=0;k<R.length;k++)g(v,T,R[k],O);return{namespace:v._config.namespace,nodes:O}}function C(v){let T=[];for(let O=0;O<v.length;O++){let R=r.$parseSerializedNode(v[O]);r.$isTextNode(R)&&t.$addNodeStyle(R),T.push(R)}return T}let b=null;function y(v,T){var O=i?(v._window||window).getSelection():null;if(!O)return!1;var R=O.anchorNode;if(O=O.focusNode,R!==null&&O!==null&&!r.isSelectionWithinEditor(v,R,O)||(T.preventDefault(),T=T.clipboardData,R=r.$getSelection(),T===null||R===null))return!1;O=a(v),v=l(v);let k="";return R!==null&&(k=R.getTextContent()),O!==null&&T.setData("text/html",O),v!==null&&T.setData("application/x-lexical-editor",v),T.setData("text/plain",k),!0}return hi.$generateJSONFromSelectedNodes=_,hi.$generateNodesFromSerializedNodes=C,hi.$getHtmlContent=a,hi.$getLexicalContent=l,hi.$insertDataTransferForPlainText=function(v,T){v=v.getData("text/plain")||v.getData("text/uri-list"),v!=null&&T.insertRawText(v)},hi.$insertDataTransferForRichText=function(v,T,O){var R=v.getData("application/x-lexical-editor");if(R)try{let P=JSON.parse(R);if(P.namespace===O._config.namespace&&Array.isArray(P.nodes)){let M=C(P.nodes);return u(O,M,T)}}catch{}if(R=v.getData("text/html"))try{var k=new DOMParser().parseFromString(R,"text/html");let P=e.$generateNodesFromDOM(O,k);return u(O,P,T)}catch{}if(v=v.getData("text/plain")||v.getData("text/uri-list"),v!=null)if(r.$isRangeSelection(T))for(v=v.split(/(\r?\n|\t)/),v[v.length-1]===""&&v.pop(),O=0;O<v.length;O++)k=v[O],k===`
|
|
272
|
+
`||k===`\r
|
|
273
|
+
`?T.insertParagraph():k===" "?T.insertNodes([r.$createTabNode()]):T.insertText(k);else T.insertRawText(v)},hi.$insertGeneratedNodes=u,hi.copyToClipboard=async function(v,T){if(b!==null)return!1;if(T!==null)return new Promise(M=>{v.update(()=>{M(y(v,T))})});var O=v.getRootElement();let R=v._window==null?window.document:v._window.document,k=i?(v._window||window).getSelection():null;if(O===null||k===null)return!1;let P=R.createElement("span");return P.style.cssText="position: fixed; top: -1000px;",P.append(R.createTextNode("#")),O.append(P),O=new Range,O.setStart(P,0),O.setEnd(P,1),k.removeAllRanges(),k.addRange(O),new Promise(M=>{let Y=v.registerCommand(r.COPY_COMMAND,X=>(n.objectKlassEquals(X,ClipboardEvent)&&(Y(),b!==null&&(window.clearTimeout(b),b=null),M(y(v,X))),!0),r.COMMAND_PRIORITY_CRITICAL);b=window.setTimeout(()=>{Y(),b=null,M(!1)},50),R.execCommand("copy"),P.remove()})},hi}var u_,d_;function SN(){return d_||(d_=1,u_=process.env.NODE_ENV==="development"?l7():c7()),u_}var f_;function u7(){if(f_)return Io;f_=1;var e=SN(),t=za(),n=vn(),r=Xt();function o(pe,te){if(typeof document.caretRangeFromPoint<"u"){const fe=document.caretRangeFromPoint(pe,te);return fe===null?null:{node:fe.startContainer,offset:fe.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const fe=document.caretPositionFromPoint(pe,te);return fe===null?null:{node:fe.offsetNode,offset:fe.offset}}else return null}const i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,g=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),_=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!g,C=r.createCommand("DRAG_DROP_PASTE_FILE");class b extends r.ElementNode{static getType(){return"quote"}static clone(te){return new b(te.__key)}constructor(te){super(te)}createDOM(te){const fe=document.createElement("blockquote");return n.addClassNamesToElement(fe,te.theme.quote),fe}updateDOM(te,fe){return!1}static importDOM(){return{blockquote:te=>({conversion:k,priority:0})}}exportDOM(te){const{element:fe}=super.exportDOM(te);if(fe&&n.isHTMLElement(fe)){this.isEmpty()&&fe.append(document.createElement("br"));const V=this.getFormatType();fe.style.textAlign=V;const j=this.getDirection();j&&(fe.dir=j)}return{element:fe}}static importJSON(te){const fe=y();return fe.setFormat(te.format),fe.setIndent(te.indent),fe.setDirection(te.direction),fe}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(te,fe){const V=r.$createParagraphNode(),j=this.getDirection();return V.setDirection(j),this.insertAfter(V,fe),V}collapseAtStart(){const te=r.$createParagraphNode();return this.getChildren().forEach(fe=>te.append(fe)),this.replace(te),!0}}function y(){return r.$applyNodeReplacement(new b)}function v(pe){return pe instanceof b}class T extends r.ElementNode{static getType(){return"heading"}static clone(te){return new T(te.__tag,te.__key)}constructor(te,fe){super(fe),this.__tag=te}getTag(){return this.__tag}createDOM(te){const fe=this.__tag,V=document.createElement(fe),j=te.theme.heading;if(j!==void 0){const ee=j[fe];n.addClassNamesToElement(V,ee)}return V}updateDOM(te,fe){return!1}static importDOM(){return{h1:te=>({conversion:R,priority:0}),h2:te=>({conversion:R,priority:0}),h3:te=>({conversion:R,priority:0}),h4:te=>({conversion:R,priority:0}),h5:te=>({conversion:R,priority:0}),h6:te=>({conversion:R,priority:0}),p:te=>{const fe=te.firstChild;return fe!==null&&O(fe)?{conversion:()=>({node:null}),priority:3}:null},span:te=>O(te)?{conversion:fe=>({node:P("h1")}),priority:3}:null}}exportDOM(te){const{element:fe}=super.exportDOM(te);if(fe&&n.isHTMLElement(fe)){this.isEmpty()&&fe.append(document.createElement("br"));const V=this.getFormatType();fe.style.textAlign=V;const j=this.getDirection();j&&(fe.dir=j)}return{element:fe}}static importJSON(te){const fe=P(te.tag);return fe.setFormat(te.format),fe.setIndent(te.indent),fe.setDirection(te.direction),fe}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(te,fe=!0){const V=te?te.anchor.offset:0,j=V===this.getTextContentSize()||!te?r.$createParagraphNode():P(this.getTag()),ee=this.getDirection();if(j.setDirection(ee),this.insertAfter(j,fe),V===0&&!this.isEmpty()&&te){const ne=r.$createParagraphNode();ne.select(),this.replace(ne,!0)}return j}collapseAtStart(){const te=this.isEmpty()?r.$createParagraphNode():P(this.getTag());return this.getChildren().forEach(fe=>te.append(fe)),this.replace(te),!0}extractWithChild(){return!0}}function O(pe){return pe.nodeName.toLowerCase()==="span"?pe.style.fontSize==="26pt":!1}function R(pe){const te=pe.nodeName.toLowerCase();let fe=null;return(te==="h1"||te==="h2"||te==="h3"||te==="h4"||te==="h5"||te==="h6")&&(fe=P(te),pe.style!==null&&fe.setFormat(pe.style.textAlign)),{node:fe}}function k(pe){const te=y();return pe.style!==null&&te.setFormat(pe.style.textAlign),{node:te}}function P(pe){return r.$applyNodeReplacement(new T(pe))}function M(pe){return pe instanceof T}function Y(pe,te){pe.preventDefault(),te.update(()=>{const fe=r.$getSelection(),V=pe instanceof InputEvent||pe instanceof KeyboardEvent?null:pe.clipboardData;V!=null&&r.$INTERNAL_isPointSelection(fe)&&e.$insertDataTransferForRichText(V,fe,te)},{tag:"paste"})}async function X(pe,te){await e.copyToClipboard(te,n.objectKlassEquals(pe,ClipboardEvent)?pe:null),te.update(()=>{const fe=r.$getSelection();r.$isRangeSelection(fe)?fe.removeText():r.$isNodeSelection(fe)&&fe.getNodes().forEach(V=>V.remove())})}function oe(pe){let te=null;if(pe instanceof DragEvent?te=pe.dataTransfer:pe instanceof ClipboardEvent&&(te=pe.clipboardData),te===null)return[!1,[],!1];const fe=te.types,V=fe.includes("Files"),j=fe.includes("text/html")||fe.includes("text/plain");return[V,Array.from(te.files),j]}function Z(pe){const te=r.$getSelection();if(!r.$isRangeSelection(te))return!1;const fe=new Set,V=te.getNodes();for(let j=0;j<V.length;j++){const ee=V[j],ne=ee.getKey();if(fe.has(ne))continue;const B=n.$getNearestBlockElementAncestorOrThrow(ee),W=B.getKey();B.canIndent()&&!fe.has(W)&&(fe.add(W),pe(B))}return fe.size>0}function U(pe){const te=r.$getNearestNodeFromDOMNode(pe);return r.$isDecoratorNode(te)}function Q(pe){const te=pe.focus;return te.key==="root"&&te.offset===r.$getRoot().getChildrenSize()}function de(pe){return n.mergeRegister(pe.registerCommand(r.CLICK_COMMAND,te=>{const fe=r.$getSelection();return r.$isNodeSelection(fe)?(fe.clear(),!0):!1},0),pe.registerCommand(r.DELETE_CHARACTER_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteCharacter(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_WORD_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteWord(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_LINE_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteLine(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,te=>{const fe=r.$getSelection();if(typeof te=="string")r.$INTERNAL_isPointSelection(fe)&&fe.insertText(te);else{if(!r.$INTERNAL_isPointSelection(fe))return!1;const V=te.dataTransfer;if(V!=null)e.$insertDataTransferForRichText(V,fe,pe);else if(r.$isRangeSelection(fe)){const j=te.data;return j&&fe.insertText(j),!0}}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_TEXT_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.formatText(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_ELEMENT_COMMAND,te=>{const fe=r.$getSelection();if(!r.$isRangeSelection(fe)&&!r.$isNodeSelection(fe))return!1;const V=fe.getNodes();for(const j of V){const ee=n.$findMatchingParent(j,ne=>r.$isElementNode(ne)&&!ne.isInline());ee!==null&&ee.setFormat(te)}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_LINE_BREAK_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.insertLineBreak(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INDENT_CONTENT_COMMAND,()=>Z(te=>{const fe=te.getIndent();te.setIndent(fe+1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>Z(te=>{const fe=te.getIndent();fe>0&&te.setIndent(fe-1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_UP_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)&&!U(te.target)){const V=fe.getNodes();if(V.length>0)return V[0].selectPrevious(),!0}else if(r.$isRangeSelection(fe)){const V=r.$getAdjacentNode(fe.focus,!0);if(!te.shiftKey&&r.$isDecoratorNode(V)&&!V.isIsolated()&&!V.isInline())return V.selectPrevious(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_DOWN_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)){const V=fe.getNodes();if(V.length>0)return V[0].selectNext(0,0),!0}else if(r.$isRangeSelection(fe)){if(Q(fe))return te.preventDefault(),!0;const V=r.$getAdjacentNode(fe.focus,!1);if(!te.shiftKey&&r.$isDecoratorNode(V)&&!V.isIsolated()&&!V.isInline())return V.selectNext(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_LEFT_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)){const V=fe.getNodes();if(V.length>0)return te.preventDefault(),V[0].selectPrevious(),!0}if(!r.$isRangeSelection(fe))return!1;if(t.$shouldOverrideDefaultCharacterSelection(fe,!0)){const V=te.shiftKey;return te.preventDefault(),t.$moveCharacter(fe,V,!0),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)&&!U(te.target)){const j=fe.getNodes();if(j.length>0)return te.preventDefault(),j[0].selectNext(0,0),!0}if(!r.$isRangeSelection(fe))return!1;const V=te.shiftKey;return t.$shouldOverrideDefaultCharacterSelection(fe,!1)?(te.preventDefault(),t.$moveCharacter(fe,V,!1),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_BACKSPACE_COMMAND,te=>{if(U(te.target))return!1;const fe=r.$getSelection();if(!r.$isRangeSelection(fe))return!1;te.preventDefault();const{anchor:V}=fe,j=V.getNode();return fe.isCollapsed()&&V.offset===0&&!r.$isRootNode(j)&&n.$getNearestBlockElementAncestorOrThrow(j).getIndent()>0?pe.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_DELETE_COMMAND,te=>{if(U(te.target))return!1;const fe=r.$getSelection();return r.$isRangeSelection(fe)?(te.preventDefault(),pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ENTER_COMMAND,te=>{const fe=r.$getSelection();if(!r.$isRangeSelection(fe))return!1;if(te!==null){if((p||u||_)&&l)return!1;if(te.preventDefault(),te.shiftKey)return pe.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return pe.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(pe.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DROP_COMMAND,te=>{const[,fe]=oe(te);if(fe.length>0){const j=te.clientX,ee=te.clientY,ne=o(j,ee);if(ne!==null){const{offset:B,node:W}=ne,J=r.$getNearestNodeFromDOMNode(W);if(J!==null){const F=r.$createRangeSelection();if(r.$isTextNode(J))F.anchor.set(J.getKey(),B,"text"),F.focus.set(J.getKey(),B,"text");else{const N=J.getParentOrThrow().getKey(),I=J.getIndexWithinParent()+1;F.anchor.set(N,I,"element"),F.focus.set(N,I,"element")}const w=r.$normalizeSelection__EXPERIMENTAL(F);r.$setSelection(w)}pe.dispatchCommand(C,fe)}return te.preventDefault(),!0}const V=r.$getSelection();return!!r.$isRangeSelection(V)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGSTART_COMMAND,te=>{const[fe]=oe(te),V=r.$getSelection();return!(fe&&!r.$isRangeSelection(V))},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGOVER_COMMAND,te=>{const[fe]=oe(te),V=r.$getSelection();if(fe&&!r.$isRangeSelection(V))return!1;const j=te.clientX,ee=te.clientY,ne=o(j,ee);if(ne!==null){const B=r.$getNearestNodeFromDOMNode(ne.node);r.$isDecoratorNode(B)&&te.preventDefault()}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.COPY_COMMAND,te=>(e.copyToClipboard(pe,n.objectKlassEquals(te,ClipboardEvent)?te:null),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CUT_COMMAND,te=>(X(te,pe),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.PASTE_COMMAND,te=>{const[,fe,V]=oe(te);if(fe.length>0&&!V)return pe.dispatchCommand(C,fe),!0;if(r.isSelectionCapturedInDecoratorInput(te.target))return!1;const j=r.$getSelection();return r.$INTERNAL_isPointSelection(j)?(Y(te,pe),!0):!1},r.COMMAND_PRIORITY_EDITOR))}return Io.$createHeadingNode=P,Io.$createQuoteNode=y,Io.$isHeadingNode=M,Io.$isQuoteNode=v,Io.DRAG_DROP_PASTE=C,Io.HeadingNode=T,Io.QuoteNode=b,Io.eventFiles=oe,Io.registerRichText=de,Io}var Lo={},h_;function d7(){if(h_)return Lo;h_=1;var e=SN(),t=za(),n=vn(),r=Xt();function o(Z,U){return typeof document.caretRangeFromPoint<"u"?(Z=document.caretRangeFromPoint(Z,U),Z===null?null:{node:Z.startContainer,offset:Z.startOffset}):document.caretPositionFromPoint!=="undefined"?(Z=document.caretPositionFromPoint(Z,U),Z===null?null:{node:Z.offsetNode,offset:Z.offset}):null}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,g=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),_=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!g,C=r.createCommand("DRAG_DROP_PASTE_FILE");class b extends r.ElementNode{static getType(){return"quote"}static clone(U){return new b(U.__key)}constructor(U){super(U)}createDOM(U){let Q=document.createElement("blockquote");return n.addClassNamesToElement(Q,U.theme.quote),Q}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:R,priority:0})}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var Q=this.getFormatType();U.style.textAlign=Q,(Q=this.getDirection())&&(U.dir=Q)}return{element:U}}static importJSON(U){let Q=y();return Q.setFormat(U.format),Q.setIndent(U.indent),Q.setDirection(U.direction),Q}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(U,Q){U=r.$createParagraphNode();let de=this.getDirection();return U.setDirection(de),this.insertAfter(U,Q),U}collapseAtStart(){let U=r.$createParagraphNode();return this.getChildren().forEach(Q=>U.append(Q)),this.replace(U),!0}}function y(){return r.$applyNodeReplacement(new b)}class v extends r.ElementNode{static getType(){return"heading"}static clone(U){return new v(U.__tag,U.__key)}constructor(U,Q){super(Q),this.__tag=U}getTag(){return this.__tag}createDOM(U){let Q=this.__tag,de=document.createElement(Q);return U=U.theme.heading,U!==void 0&&n.addClassNamesToElement(de,U[Q]),de}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:O,priority:0}),h2:()=>({conversion:O,priority:0}),h3:()=>({conversion:O,priority:0}),h4:()=>({conversion:O,priority:0}),h5:()=>({conversion:O,priority:0}),h6:()=>({conversion:O,priority:0}),p:U=>(U=U.firstChild,U!==null&&T(U)?{conversion:()=>({node:null}),priority:3}:null),span:U=>T(U)?{conversion:()=>({node:k("h1")}),priority:3}:null}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var Q=this.getFormatType();U.style.textAlign=Q,(Q=this.getDirection())&&(U.dir=Q)}return{element:U}}static importJSON(U){let Q=k(U.tag);return Q.setFormat(U.format),Q.setIndent(U.indent),Q.setDirection(U.direction),Q}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(U,Q=!0){let de=U?U.anchor.offset:0,pe=de!==this.getTextContentSize()&&U?k(this.getTag()):r.$createParagraphNode(),te=this.getDirection();return pe.setDirection(te),this.insertAfter(pe,Q),de===0&&!this.isEmpty()&&U&&(U=r.$createParagraphNode(),U.select(),this.replace(U,!0)),pe}collapseAtStart(){let U=this.isEmpty()?r.$createParagraphNode():k(this.getTag());return this.getChildren().forEach(Q=>U.append(Q)),this.replace(U),!0}extractWithChild(){return!0}}function T(Z){return Z.nodeName.toLowerCase()==="span"?Z.style.fontSize==="26pt":!1}function O(Z){let U=Z.nodeName.toLowerCase(),Q=null;return(U==="h1"||U==="h2"||U==="h3"||U==="h4"||U==="h5"||U==="h6")&&(Q=k(U),Z.style!==null&&Q.setFormat(Z.style.textAlign)),{node:Q}}function R(Z){let U=y();return Z.style!==null&&U.setFormat(Z.style.textAlign),{node:U}}function k(Z){return r.$applyNodeReplacement(new v(Z))}function P(Z,U){Z.preventDefault(),U.update(()=>{let Q=r.$getSelection(),de=Z instanceof InputEvent||Z instanceof KeyboardEvent?null:Z.clipboardData;de!=null&&r.$INTERNAL_isPointSelection(Q)&&e.$insertDataTransferForRichText(de,Q,U)},{tag:"paste"})}async function M(Z,U){await e.copyToClipboard(U,n.objectKlassEquals(Z,ClipboardEvent)?Z:null),U.update(()=>{let Q=r.$getSelection();r.$isRangeSelection(Q)?Q.removeText():r.$isNodeSelection(Q)&&Q.getNodes().forEach(de=>de.remove())})}function Y(Z){let U=null;if(Z instanceof DragEvent?U=Z.dataTransfer:Z instanceof ClipboardEvent&&(U=Z.clipboardData),U===null)return[!1,[],!1];var Q=U.types;return Z=Q.includes("Files"),Q=Q.includes("text/html")||Q.includes("text/plain"),[Z,Array.from(U.files),Q]}function X(Z){var U=r.$getSelection();if(!r.$isRangeSelection(U))return!1;let Q=new Set;U=U.getNodes();for(let te=0;te<U.length;te++){var de=U[te],pe=de.getKey();Q.has(pe)||(de=n.$getNearestBlockElementAncestorOrThrow(de),pe=de.getKey(),de.canIndent()&&!Q.has(pe)&&(Q.add(pe),Z(de)))}return 0<Q.size}function oe(Z){return Z=r.$getNearestNodeFromDOMNode(Z),r.$isDecoratorNode(Z)}return Lo.$createHeadingNode=k,Lo.$createQuoteNode=y,Lo.$isHeadingNode=function(Z){return Z instanceof v},Lo.$isQuoteNode=function(Z){return Z instanceof b},Lo.DRAG_DROP_PASTE=C,Lo.HeadingNode=v,Lo.QuoteNode=b,Lo.eventFiles=Y,Lo.registerRichText=function(Z){return n.mergeRegister(Z.registerCommand(r.CLICK_COMMAND,()=>{const U=r.$getSelection();return r.$isNodeSelection(U)?(U.clear(),!0):!1},0),Z.registerCommand(r.DELETE_CHARACTER_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteCharacter(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_WORD_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteWord(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_LINE_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteLine(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,U=>{const Q=r.$getSelection();if(typeof U=="string")r.$INTERNAL_isPointSelection(Q)&&Q.insertText(U);else{if(!r.$INTERNAL_isPointSelection(Q))return!1;const de=U.dataTransfer;de!=null?e.$insertDataTransferForRichText(de,Q,Z):r.$isRangeSelection(Q)&&(U=U.data)&&Q.insertText(U)}return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_TEXT_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.formatText(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_ELEMENT_COMMAND,U=>{var Q=r.$getSelection();if(!r.$isRangeSelection(Q)&&!r.$isNodeSelection(Q))return!1;Q=Q.getNodes();for(const de of Q)Q=n.$findMatchingParent(de,pe=>r.$isElementNode(pe)&&!pe.isInline()),Q!==null&&Q.setFormat(U);return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_LINE_BREAK_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.insertLineBreak(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INDENT_CONTENT_COMMAND,()=>X(U=>{const Q=U.getIndent();U.setIndent(Q+1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>X(U=>{const Q=U.getIndent();0<Q&&U.setIndent(Q-1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_UP_COMMAND,U=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(U.target)){if(U=Q.getNodes(),0<U.length)return U[0].selectPrevious(),!0}else if(r.$isRangeSelection(Q)&&(Q=r.$getAdjacentNode(Q.focus,!0),!U.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline()))return Q.selectPrevious(),U.preventDefault(),!0;return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_DOWN_COMMAND,U=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)){if(U=Q.getNodes(),0<U.length)return U[0].selectNext(0,0),!0}else if(r.$isRangeSelection(Q)){let de=Q.focus;if(de.key==="root"&&de.offset===r.$getRoot().getChildrenSize())return U.preventDefault(),!0;if(Q=r.$getAdjacentNode(Q.focus,!1),!U.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline())return Q.selectNext(),U.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_LEFT_COMMAND,U=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)){var de=Q.getNodes();if(0<de.length)return U.preventDefault(),de[0].selectPrevious(),!0}return r.$isRangeSelection(Q)&&t.$shouldOverrideDefaultCharacterSelection(Q,!0)?(de=U.shiftKey,U.preventDefault(),t.$moveCharacter(Q,de,!0),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,U=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(U.target)){var de=Q.getNodes();if(0<de.length)return U.preventDefault(),de[0].selectNext(0,0),!0}return r.$isRangeSelection(Q)?(de=U.shiftKey,t.$shouldOverrideDefaultCharacterSelection(Q,!1)?(U.preventDefault(),t.$moveCharacter(Q,de,!1),!0):!1):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_BACKSPACE_COMMAND,U=>{if(oe(U.target))return!1;const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;U.preventDefault(),{anchor:U}=Q;const de=U.getNode();return Q.isCollapsed()&&U.offset===0&&!r.$isRootNode(de)&&0<n.$getNearestBlockElementAncestorOrThrow(de).getIndent()?Z.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_DELETE_COMMAND,U=>{if(oe(U.target))return!1;const Q=r.$getSelection();return r.$isRangeSelection(Q)?(U.preventDefault(),Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ENTER_COMMAND,U=>{const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;if(U!==null){if((p||u||_)&&l)return!1;if(U.preventDefault(),U.shiftKey)return Z.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return Z.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(Z.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DROP_COMMAND,U=>{const[,Q]=Y(U);if(0<Q.length){var de=o(U.clientX,U.clientY);if(de!==null){const{offset:te,node:fe}=de;var pe=r.$getNearestNodeFromDOMNode(fe);if(pe!==null){if(de=r.$createRangeSelection(),r.$isTextNode(pe))de.anchor.set(pe.getKey(),te,"text"),de.focus.set(pe.getKey(),te,"text");else{const V=pe.getParentOrThrow().getKey();pe=pe.getIndexWithinParent()+1,de.anchor.set(V,pe,"element"),de.focus.set(V,pe,"element")}de=r.$normalizeSelection__EXPERIMENTAL(de),r.$setSelection(de)}Z.dispatchCommand(C,Q)}return U.preventDefault(),!0}return U=r.$getSelection(),!!r.$isRangeSelection(U)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGSTART_COMMAND,U=>{[U]=Y(U);const Q=r.$getSelection();return!(U&&!r.$isRangeSelection(Q))},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGOVER_COMMAND,U=>{var[Q]=Y(U);const de=r.$getSelection();return Q&&!r.$isRangeSelection(de)?!1:(Q=o(U.clientX,U.clientY),Q!==null&&(Q=r.$getNearestNodeFromDOMNode(Q.node),r.$isDecoratorNode(Q)&&U.preventDefault()),!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.COPY_COMMAND,U=>(e.copyToClipboard(Z,n.objectKlassEquals(U,ClipboardEvent)?U:null),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CUT_COMMAND,U=>(M(U,Z),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.PASTE_COMMAND,U=>{const[,Q,de]=Y(U);if(0<Q.length&&!de)return Z.dispatchCommand(C,Q),!0;if(r.isSelectionCapturedInDecoratorInput(U.target))return!1;const pe=r.$getSelection();return r.$INTERNAL_isPointSelection(pe)?(P(U,Z),!0):!1},r.COMMAND_PRIORITY_EDITOR))},Lo}var p_,g_;function ry(){return g_||(g_=1,p_=process.env.NODE_ENV==="development"?u7():d7()),p_}var m_;function f7(){if(m_)return dp;m_=1;var e=cr(),t=CN(),n=H,r=wN(),o=vn(),i=Mu,a=TN(),l=ry(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(v){return v.getEditorState().read(r.$canShowPlaceholderCurry(v.isComposing()))}function g(v){const[T,O]=n.useState(()=>p(v));return u(()=>{function R(){const k=p(v);O(k)}return R(),o.mergeRegister(v.registerUpdateListener(()=>{R()}),v.registerEditableListener(()=>{R()}))},[v]),T}function _(v,T){const[O,R]=n.useState(()=>v.getDecorators());return u(()=>v.registerDecoratorListener(k=>{i.flushSync(()=>{R(k)})}),[v]),n.useEffect(()=>{R(v.getDecorators())},[v]),n.useMemo(()=>{const k=[],P=Object.keys(O);for(let M=0;M<P.length;M++){const Y=P[M],X=n.createElement(T,{onError:Z=>v._onError(Z)},n.createElement(n.Suspense,{fallback:null},O[Y])),oe=v.getElementByKey(Y);oe!==null&&k.push(i.createPortal(X,oe,Y))}return k},[T,O,v])}function C(v){u(()=>o.mergeRegister(l.registerRichText(v),a.registerDragonSupport(v)),[v])}function b({contentEditable:v,placeholder:T,ErrorBoundary:O}){const[R]=e.useLexicalComposerContext(),k=_(R,O);return C(R),n.createElement(n.Fragment,null,v,n.createElement(y,{content:T}),k)}function y({content:v}){const[T]=e.useLexicalComposerContext(),O=g(T),R=t();return O?typeof v=="function"?v(R):v:null}return dp.RichTextPlugin=b,dp}var mp={},y_;function h7(){if(y_)return mp;y_=1;var e=cr(),t=CN(),n=H,r=wN(),o=vn(),i=Mu,a=TN(),l=ry(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(y){return y.getEditorState().read(r.$canShowPlaceholderCurry(y.isComposing()))}function g(y){let[v,T]=n.useState(()=>p(y));return u(()=>{function O(){let R=p(y);T(R)}return O(),o.mergeRegister(y.registerUpdateListener(()=>{O()}),y.registerEditableListener(()=>{O()}))},[y]),v}function _(y,v){let[T,O]=n.useState(()=>y.getDecorators());return u(()=>y.registerDecoratorListener(R=>{i.flushSync(()=>{O(R)})}),[y]),n.useEffect(()=>{O(y.getDecorators())},[y]),n.useMemo(()=>{let R=[],k=Object.keys(T);for(let P=0;P<k.length;P++){let M=k[P],Y=n.createElement(v,{onError:oe=>y._onError(oe)},n.createElement(n.Suspense,{fallback:null},T[M])),X=y.getElementByKey(M);X!==null&&R.push(i.createPortal(Y,X,M))}return R},[v,T,y])}function C(y){u(()=>o.mergeRegister(l.registerRichText(y),a.registerDragonSupport(y)),[y])}function b({content:y}){var[v]=e.useLexicalComposerContext();v=g(v);let T=t();return v?typeof y=="function"?y(T):y:null}return mp.RichTextPlugin=function({contentEditable:y,placeholder:v,ErrorBoundary:T}){let[O]=e.useLexicalComposerContext();return T=_(O,T),C(O),n.createElement(n.Fragment,null,y,n.createElement(b,{content:v}),T)},mp}process.env.NODE_ENV==="development"?f7():h7();var yp={},v_;function p7(){if(v_)return yp;v_=1;var e=cr(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(i){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function o({ariaActiveDescendant:i,ariaAutoComplete:a,ariaControls:l,ariaDescribedBy:u,ariaExpanded:p,ariaLabel:g,ariaLabelledBy:_,ariaMultiline:C,ariaOwns:b,ariaRequired:y,autoCapitalize:v,className:T,id:O,role:R="textbox",spellCheck:k=!0,style:P,tabIndex:M,"data-testid":Y,...X}){const[oe]=e.useLexicalComposerContext(),[Z,U]=t.useState(!1),Q=t.useCallback(de=>{oe.setRootElement(de)},[oe]);return r(()=>(U(oe.isEditable()),oe.registerEditableListener(de=>{U(de)})),[oe]),t.createElement("div",n({},X,{"aria-activedescendant":Z?i:void 0,"aria-autocomplete":Z?a:"none","aria-controls":Z?l:void 0,"aria-describedby":u,"aria-expanded":Z&&R==="combobox"?!!p:void 0,"aria-label":g,"aria-labelledby":_,"aria-multiline":C,"aria-owns":Z?b:void 0,"aria-readonly":Z?void 0:!0,"aria-required":y,autoCapitalize:v,className:T,contentEditable:Z,"data-testid":Y,id:O,ref:Q,role:R,spellCheck:k,style:P,tabIndex:M}))}return yp.ContentEditable=o,yp}var vp={},b_;function g7(){if(b_)return vp;b_=1;var e=cr(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(o){for(var i=1;i<arguments.length;i++){var a=arguments[i],l;for(l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;return vp.ContentEditable=function({ariaActiveDescendant:o,ariaAutoComplete:i,ariaControls:a,ariaDescribedBy:l,ariaExpanded:u,ariaLabel:p,ariaLabelledBy:g,ariaMultiline:_,ariaOwns:C,ariaRequired:b,autoCapitalize:y,className:v,id:T,role:O="textbox",spellCheck:R=!0,style:k,tabIndex:P,"data-testid":M,...Y}){let[X]=e.useLexicalComposerContext(),[oe,Z]=t.useState(!1),U=t.useCallback(Q=>{X.setRootElement(Q)},[X]);return r(()=>(Z(X.isEditable()),X.registerEditableListener(Q=>{Z(Q)})),[X]),t.createElement("div",n({},Y,{"aria-activedescendant":oe?o:void 0,"aria-autocomplete":oe?i:"none","aria-controls":oe?a:void 0,"aria-describedby":l,"aria-expanded":oe&&O==="combobox"?!!u:void 0,"aria-label":p,"aria-labelledby":g,"aria-multiline":_,"aria-owns":oe?C:void 0,"aria-readonly":oe?void 0:!0,"aria-required":b,autoCapitalize:y,className:v,contentEditable:oe,"data-testid":M,id:T,ref:U,role:O,spellCheck:R,style:k,tabIndex:P}))},vp}process.env.NODE_ENV==="development"?p7():g7();var bp,__;function m7(){if(__)return bp;__=1;var e=H;function t(l,u){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,g){return p.__proto__=g,p},t(l,u)}function n(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,t(l,u)}var r=function(l,u){return l===void 0&&(l=[]),u===void 0&&(u=[]),l.length!==u.length||l.some(function(p,g){return!Object.is(p,u[g])})},o={error:null},i=function(l){n(u,l);function u(){for(var g,_=arguments.length,C=new Array(_),b=0;b<_;b++)C[b]=arguments[b];return g=l.call.apply(l,[this].concat(C))||this,g.state=o,g.resetErrorBoundary=function(){for(var y,v=arguments.length,T=new Array(v),O=0;O<v;O++)T[O]=arguments[O];g.props.onReset==null||(y=g.props).onReset.apply(y,T),g.reset()},g}u.getDerivedStateFromError=function(g){return{error:g}};var p=u.prototype;return p.reset=function(){this.setState(o)},p.componentDidCatch=function(g,_){var C,b;(C=(b=this.props).onError)==null||C.call(b,g,_)},p.componentDidUpdate=function(g,_){var C=this.state.error,b=this.props.resetKeys;if(C!==null&&_.error!==null&&r(g.resetKeys,b)){var y,v;(y=(v=this.props).onResetKeysChange)==null||y.call(v,g.resetKeys,b),this.reset()}},p.render=function(){var g=this.state.error,_=this.props,C=_.fallbackRender,b=_.FallbackComponent,y=_.fallback;if(g!==null){var v={error:g,resetErrorBoundary:this.resetErrorBoundary};if(e.isValidElement(y))return y;if(typeof C=="function")return C(v);if(b)return e.createElement(b,v);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},u}(e.Component);function a({children:l,onError:u}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:u},l)}return bp=a,bp}var _p,x_;function y7(){if(x_)return _p;x_=1;var e=H;function t(a,l){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,p){return u.__proto__=p,u},t(a,l)}function n(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,t(a,l)}function r(a,l){return a===void 0&&(a=[]),l===void 0&&(l=[]),a.length!==l.length||a.some(function(u,p){return!Object.is(u,l[p])})}var o={error:null},i=function(a){function l(){for(var p,g=arguments.length,_=Array(g),C=0;C<g;C++)_[C]=arguments[C];return p=a.call.apply(a,[this].concat(_))||this,p.state=o,p.resetErrorBoundary=function(){for(var b,y=arguments.length,v=Array(y),T=0;T<y;T++)v[T]=arguments[T];p.props.onReset==null||(b=p.props).onReset.apply(b,v),p.reset()},p}n(l,a),l.getDerivedStateFromError=function(p){return{error:p}};var u=l.prototype;return u.reset=function(){this.setState(o)},u.componentDidCatch=function(p,g){var _,C;(_=(C=this.props).onError)==null||_.call(C,p,g)},u.componentDidUpdate=function(p,g){var _=this.props.resetKeys;if(this.state.error!==null&&g.error!==null&&r(p.resetKeys,_)){var C,b;(C=(b=this.props).onResetKeysChange)==null||C.call(b,p.resetKeys,_),this.reset()}},u.render=function(){var p=this.state.error,g=this.props,_=g.fallbackRender,C=g.FallbackComponent;if(g=g.fallback,p!==null){if(p={error:p,resetErrorBoundary:this.resetErrorBoundary},e.isValidElement(g))return g;if(typeof _=="function")return _(p);if(C)return e.createElement(C,p);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},l}(e.Component);return _p=function({children:a,onError:l}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:l},a)},_p}process.env.NODE_ENV==="development"?m7():y7();var xp={},Or={},E_;function v7(){if(E_)return Or;E_=1;var e=Xt(),t=vn();function n(B){let W=1,J=B.getParent();for(;J!=null;){if(oe(J)){const F=J.getParent();if(fe(F)){W++,J=F.getParent();continue}throw Error("A ListItemNode must have a ListNode for a parent.")}return W}return W}function r(B){let W=B.getParent();if(!fe(W))throw Error("A ListItemNode must have a ListNode for a parent.");let J=W;for(;J!==null;)J=J.getParent(),fe(J)&&(W=J);return W}function o(B){let W=[];const J=B.getChildren().filter(oe);for(let F=0;F<J.length;F++){const w=J[F],N=w.getFirstChild();fe(N)?W=W.concat(o(N)):W.push(w)}return W}function i(B){return oe(B)&&fe(B.getFirstChild())}function a(B){let W=B;for(;W.getNextSibling()==null&&W.getPreviousSibling()==null;){const J=W.getParent();if(J==null||!(oe(W)||fe(W)))break;W=J}W.remove()}function l(B){return X().append(B)}function u(B,W){return oe(B)&&(W.length===0||W.length===1&&B.is(W[0])&&B.getChildrenSize()===0)}function p(B){const W=B.getParent();let J=1;if(W!=null)if(fe(W))J=W.getStart();else throw Error("$getListItemValue: list node is not parent of list item node");const F=B.getPreviousSiblings();for(let w=0;w<F.length;w++){const N=F[w];oe(N)&&!fe(N.getFirstChild())&&J++}return J}function g(B,W){B.update(()=>{const J=e.$getSelection();if(e.$INTERNAL_isPointSelection(J)){const F=J.getNodes(),w=J.anchor.getNode(),N=w.getParent();if(u(w,F)){const I=te(W);if(e.$isRootOrShadowRoot(N)){w.replace(I);const q=X();e.$isElementNode(w)&&(q.setFormat(w.getFormatType()),q.setIndent(w.getIndent())),I.append(q)}else if(oe(w)){const q=w.getParentOrThrow();_(I,q.getChildren()),q.replace(I)}return}else{const I=new Set;for(let q=0;q<F.length;q++){const ue=F[q];if(e.$isElementNode(ue)&&ue.isEmpty()&&!oe(ue)&&!I.has(ue.getKey())){C(ue,W);continue}if(e.$isLeafNode(ue)){let he=ue.getParent();for(;he!=null;){const se=he.getKey();if(fe(he)){if(!I.has(se)){const Ce=te(W);_(Ce,he.getChildren()),he.replace(Ce),v(Ce),I.add(se)}break}else{const Ce=he.getParent();if(e.$isRootOrShadowRoot(Ce)&&!I.has(se)){I.add(se),C(he,W);break}he=Ce}}}}}}})}function _(B,W){B.splice(B.getChildrenSize(),0,W)}function C(B,W){if(fe(B))return B;const J=B.getPreviousSibling(),F=B.getNextSibling(),w=X();if(w.setFormat(B.getFormatType()),w.setIndent(B.getIndent()),_(w,B.getChildren()),fe(J)&&W===J.getListType())return J.append(w),B.remove(),fe(F)&&W===F.getListType()&&(_(J,F.getChildren()),F.remove()),J;if(fe(F)&&W===F.getListType())return F.getFirstChildOrThrow().insertBefore(w),B.remove(),F;{const N=te(W);return N.append(w),B.replace(N),v(N),N}}function b(B,W){const J=B.getLastChild(),F=W.getFirstChild();J&&F&&i(J)&&i(F)&&(b(J.getFirstChild(),F.getFirstChild()),F.remove());const w=W.getChildren();w.length>0&&(B.append(...w),v(B)),W.remove()}function y(B){B.update(()=>{const W=e.$getSelection();if(e.$isRangeSelection(W)){const J=new Set,F=W.getNodes(),w=W.anchor.getNode();if(u(w,F))J.add(r(w));else for(let N=0;N<F.length;N++){const I=F[N];if(e.$isLeafNode(I)){const q=t.$getNearestNodeOfType(I,k);q!=null&&J.add(r(q))}}for(const N of J){let I=N;const q=o(N);for(const ue of q){const he=e.$createParagraphNode();_(he,ue.getChildren()),I.insertAfter(he),I=he,ue.__key===W.anchor.key&&W.anchor.set(he.getKey(),0,"element"),ue.__key===W.focus.key&&W.focus.set(he.getKey(),0,"element"),ue.remove()}N.remove()}}})}function v(B,W){const J=W||B.getChildren();if(J!==void 0)for(let F=0;F<J.length;F++){const w=J[F];if(oe(w)){const N=w.getValue(),I=p(w);N!==I&&w.setValue(I)}}}function T(B){const W=new Set;if(i(B)||W.has(B.getKey()))return;const J=B.getParent(),F=B.getNextSibling(),w=B.getPreviousSibling();if(i(F)&&i(w)){const N=w.getFirstChild();if(fe(N)){N.append(B);const I=F.getFirstChild();if(fe(I)){const q=I.getChildren();_(N,q),F.remove(),W.add(F.getKey())}v(N)}}else if(i(F)){const N=F.getFirstChild();if(fe(N)){const I=N.getFirstChild();I!==null&&I.insertBefore(B),v(N)}}else if(i(w)){const N=w.getFirstChild();fe(N)&&(N.append(B),v(N))}else if(fe(J)){const N=X(),I=te(J.getListType());N.append(I),I.append(B),w?w.insertAfter(N):F?F.insertBefore(N):J.append(N),v(I)}fe(J)&&v(J)}function O(B){if(i(B))return;const W=B.getParent(),J=W?W.getParent():void 0,F=J?J.getParent():void 0;if(fe(F)&&oe(J)&&fe(W)){const w=W?W.getFirstChild():void 0,N=W?W.getLastChild():void 0;if(B.is(w))J.insertBefore(B),W.isEmpty()&&J.remove();else if(B.is(N))J.insertAfter(B),W.isEmpty()&&J.remove();else{const I=W.getListType(),q=X(),ue=te(I);q.append(ue),B.getPreviousSiblings().forEach(Ce=>ue.append(Ce));const he=X(),se=te(I);he.append(se),_(se,B.getNextSiblings()),J.insertBefore(q),J.insertAfter(he),J.replace(B)}v(W),v(F)}}function R(){const B=e.$getSelection();if(!e.$isRangeSelection(B)||!B.isCollapsed())return!1;const W=B.anchor.getNode();if(!oe(W)||W.getChildrenSize()!==0)return!1;const J=r(W),F=W.getParent();if(!fe(F))throw Error("A ListItemNode must have a ListNode for a parent.");const w=F.getParent();let N;if(e.$isRootOrShadowRoot(w))N=e.$createParagraphNode(),J.insertAfter(N);else if(oe(w))N=X(),w.insertAfter(N);else return!1;N.select();const I=W.getNextSiblings();if(I.length>0){const q=te(F.getListType());if(e.$isParagraphNode(N))N.insertAfter(q);else{const ue=X();ue.append(q),N.insertAfter(ue)}I.forEach(ue=>{ue.remove(),q.append(ue)})}return a(W),!0}class k extends e.ElementNode{static getType(){return"listitem"}static clone(W){return new k(W.__value,W.__checked,W.__key)}constructor(W,J,F){super(F),this.__value=W===void 0?1:W,this.__checked=J}createDOM(W){const J=document.createElement("li"),F=this.getParent();return fe(F)&&F.getListType()==="check"&&M(J,this,null),J.value=this.__value,P(J,W.theme,this),J}updateDOM(W,J,F){const w=this.getParent();return fe(w)&&w.getListType()==="check"&&M(J,this,W),J.value=this.__value,P(J,F.theme,this),!1}static transform(){return W=>{const J=W.getParent();fe(J)&&(v(J),J.getListType()!=="check"&&W.getChecked()!=null&&W.setChecked(void 0))}}static importDOM(){return{li:W=>({conversion:Y,priority:0})}}static importJSON(W){const J=X();return J.setChecked(W.checked),J.setValue(W.value),J.setFormat(W.format),J.setDirection(W.direction),J}exportDOM(W){const J=this.createDOM(W._config);return J.style.textAlign=this.getFormatType(),{element:J}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...W){for(let J=0;J<W.length;J++){const F=W[J];if(e.$isElementNode(F)&&this.canMergeWith(F)){const w=F.getChildren();this.append(...w),F.remove()}else super.append(F)}return this}replace(W,J){if(oe(W))return super.replace(W);this.setIndent(0);const F=this.getParentOrThrow();if(!fe(F))return W;if(F.__first===this.getKey())F.insertBefore(W);else if(F.__last===this.getKey())F.insertAfter(W);else{const w=te(F.getListType());let N=this.getNextSibling();for(;N;){const I=N;N=N.getNextSibling(),w.append(I)}F.insertAfter(W),W.insertAfter(w)}return J&&this.getChildren().forEach(w=>{W.append(w)}),this.remove(),F.getChildrenSize()===0&&F.remove(),W}insertAfter(W,J=!0){const F=this.getParentOrThrow();if(!fe(F))throw Error("insertAfter: list node is not parent of list item node");const w=this.getNextSiblings();if(oe(W)){const N=super.insertAfter(W,J),I=W.getParentOrThrow();return fe(I)&&v(I),N}if(fe(W)){let N=W;const I=W.getChildren();for(let q=I.length-1;q>=0;q--)N=I[q],this.insertAfter(N,J);return N}if(F.insertAfter(W,J),w.length!==0){const N=te(F.getListType());w.forEach(I=>N.append(I)),W.insertAfter(N,J)}return W}remove(W){const J=this.getPreviousSibling(),F=this.getNextSibling();if(super.remove(W),J&&F&&i(J)&&i(F))b(J.getFirstChild(),F.getFirstChild()),F.remove();else if(F){const w=F.getParent();fe(w)&&v(w)}}insertNewAfter(W,J=!0){const F=X(this.__checked==null?void 0:!1);return this.insertAfter(F,J),F}collapseAtStart(W){const J=e.$createParagraphNode();this.getChildren().forEach(I=>J.append(I));const F=this.getParentOrThrow(),w=F.getParentOrThrow(),N=oe(w);if(F.getChildrenSize()===1)if(N)F.remove(),w.select();else{F.insertBefore(J),F.remove();const I=W.anchor,q=W.focus,ue=J.getKey();I.type==="element"&&I.getNode().is(this)&&I.set(ue,I.offset,"element"),q.type==="element"&&q.getNode().is(this)&&q.set(ue,q.offset,"element")}else F.insertBefore(J),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(W){const J=this.getWritable();J.__value=W}getChecked(){return this.getLatest().__checked}setChecked(W){const J=this.getWritable();J.__checked=W}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const W=this.getParent();if(W===null)return this.getLatest().__indent;let J=W.getParentOrThrow(),F=0;for(;oe(J);)J=J.getParentOrThrow().getParentOrThrow(),F++;return F}setIndent(W){if(!(typeof W=="number"&&W>-1))throw Error("Invalid indent value.");let J=this.getIndent();for(;J!==W;)J<W?(T(this),J++):(O(this),J--);return this}insertBefore(W){if(oe(W)){const J=this.getParentOrThrow();if(fe(J)){const F=this.getNextSiblings();v(J,F)}}return super.insertBefore(W)}canInsertAfter(W){return oe(W)}canReplaceWith(W){return oe(W)}canMergeWith(W){return e.$isParagraphNode(W)||oe(W)}extractWithChild(W,J){if(!e.$isRangeSelection(J))return!1;const F=J.anchor.getNode(),w=J.focus.getNode();return this.isParentOf(F)&&this.isParentOf(w)&&this.getTextContent().length===J.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return te("bullet")}}function P(B,W,J){const F=[],w=[],N=W.list,I=N?N.listitem:void 0;let q;if(N&&N.nested&&(q=N.nested.listitem),I!==void 0){const ue=I.split(" ");F.push(...ue)}if(N){const ue=J.getParent(),he=fe(ue)&&ue.getListType()==="check",se=J.getChecked();(!he||se)&&w.push(N.listitemUnchecked),(!he||!se)&&w.push(N.listitemChecked),he&&F.push(se?N.listitemChecked:N.listitemUnchecked)}if(q!==void 0){const ue=q.split(" ");J.getChildren().some(he=>fe(he))?F.push(...ue):w.push(...ue)}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function M(B,W,J,F){fe(W.getFirstChild())?(B.removeAttribute("role"),B.removeAttribute("tabIndex"),B.removeAttribute("aria-checked")):(B.setAttribute("role","checkbox"),B.setAttribute("tabIndex","-1"),(!J||W.__checked!==J.__checked)&&B.setAttribute("aria-checked",W.getChecked()?"true":"false"))}function Y(B){const W=t.isHTMLElement(B)&&B.getAttribute("aria-checked")==="true";return{node:X(W)}}function X(B){return e.$applyNodeReplacement(new k(void 0,B))}function oe(B){return B instanceof k}class Z extends e.ElementNode{static getType(){return"list"}static clone(W){const J=W.__listType||pe[W.__tag];return new Z(J,W.__start,W.__key)}constructor(W,J,F){super(F);const w=pe[W]||W;this.__listType=w,this.__tag=w==="number"?"ol":"ul",this.__start=J}getTag(){return this.__tag}setListType(W){const J=this.getWritable();J.__listType=W,J.__tag=W==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(W,J){const F=this.__tag,w=document.createElement(F);return this.__start!==1&&w.setAttribute("start",String(this.__start)),w.__lexicalListType=this.__listType,U(w,W.theme,this),w}updateDOM(W,J,F){return W.__tag!==this.__tag?!0:(U(J,F.theme,this),!1)}static importDOM(){return{ol:W=>({conversion:de,priority:0}),ul:W=>({conversion:de,priority:0})}}static importJSON(W){const J=te(W.listType,W.start);return J.setFormat(W.format),J.setIndent(W.indent),J.setDirection(W.direction),J}exportDOM(W){const{element:J}=super.exportDOM(W);return J&&t.isHTMLElement(J)&&(this.__start!==1&&J.setAttribute("start",String(this.__start)),this.__listType==="check"&&J.setAttribute("__lexicalListType","check")),{element:J}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...W){for(let J=0;J<W.length;J++){const F=W[J];if(oe(F))super.append(F);else{const w=X();if(fe(F))w.append(F);else if(e.$isElementNode(F)){const N=e.$createTextNode(F.getTextContent());w.append(N)}else w.append(F);super.append(w)}}return v(this),this}extractWithChild(W){return oe(W)}}function U(B,W,J){const F=[],w=[],N=W.list;if(N!==void 0){const I=N[`${J.__tag}Depth`]||[],q=n(J)-1,ue=q%I.length,he=I[ue],se=N[J.__tag];let Ce;const Oe=N.nested;if(Oe!==void 0&&Oe.list&&(Ce=Oe.list),se!==void 0&&F.push(se),he!==void 0){const Be=he.split(" ");F.push(...Be);for(let ce=0;ce<I.length;ce++)ce!==ue&&w.push(J.__tag+ce)}if(Ce!==void 0){const Be=Ce.split(" ");q>1?F.push(...Be):w.push(...Be)}}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function Q(B){const W=[];for(let J=0;J<B.length;J++){const F=B[J];if(oe(F)){W.push(F);const w=F.getChildren();w.length>1&&w.forEach(N=>{fe(N)&&W.push(l(N))})}else W.push(l(F))}return W}function de(B){const W=B.nodeName.toLowerCase();let J=null;if(W==="ol"){const F=B.start;J=te("number",F)}else W==="ul"&&(t.isHTMLElement(B)&&B.getAttribute("__lexicallisttype")==="check"?J=te("check"):J=te("bullet"));return{after:Q,node:J}}const pe={ol:"number",ul:"bullet"};function te(B,W=1){return e.$applyNodeReplacement(new Z(B,W))}function fe(B){return B instanceof Z}const V=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),j=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),ee=e.createCommand("INSERT_CHECK_LIST_COMMAND"),ne=e.createCommand("REMOVE_LIST_COMMAND");return Or.$createListItemNode=X,Or.$createListNode=te,Or.$getListDepth=n,Or.$handleListInsertParagraph=R,Or.$isListItemNode=oe,Or.$isListNode=fe,Or.INSERT_CHECK_LIST_COMMAND=ee,Or.INSERT_ORDERED_LIST_COMMAND=j,Or.INSERT_UNORDERED_LIST_COMMAND=V,Or.ListItemNode=k,Or.ListNode=Z,Or.REMOVE_LIST_COMMAND=ne,Or.insertList=g,Or.removeList=y,Or}var Ar={},C_;function b7(){if(C_)return Ar;C_=1;var e=Xt(),t=vn();function n(V){let j=new URLSearchParams;j.append("code",V);for(let ee=1;ee<arguments.length;ee++)j.append("v",arguments[ee]);throw Error(`Minified Lexical error #${V}; visit https://lexical.dev/docs/error?${j} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(V){let j=1;for(V=V.getParent();V!=null;){if(P(V)){if(V=V.getParent(),Q(V)){j++,V=V.getParent();continue}n(40)}break}return j}function o(V){V=V.getParent(),Q(V)||n(40);let j=V;for(;j!==null;)j=j.getParent(),Q(j)&&(V=j);return V}function i(V){let j=[];V=V.getChildren().filter(P);for(let ee=0;ee<V.length;ee++){let ne=V[ee],B=ne.getFirstChild();Q(B)?j=j.concat(i(B)):j.push(ne)}return j}function a(V){return P(V)&&Q(V.getFirstChild())}function l(V){for(;V.getNextSibling()==null&&V.getPreviousSibling()==null;){let j=V.getParent();if(j==null||!P(V)&&!Q(V))break;V=j}V.remove()}function u(V){return k().append(V)}function p(V,j){return P(V)&&(j.length===0||j.length===1&&V.is(j[0])&&V.getChildrenSize()===0)}function g(V,j){V.splice(V.getChildrenSize(),0,j)}function _(V,j){if(Q(V))return V;let ee=V.getPreviousSibling(),ne=V.getNextSibling(),B=k();return B.setFormat(V.getFormatType()),B.setIndent(V.getIndent()),g(B,V.getChildren()),Q(ee)&&j===ee.getListType()?(ee.append(B),V.remove(),Q(ne)&&j===ne.getListType()&&(g(ee,ne.getChildren()),ne.remove()),ee):Q(ne)&&j===ne.getListType()?(ne.getFirstChildOrThrow().insertBefore(B),V.remove(),ne):(j=U(j),j.append(B),V.replace(j),b(j),j)}function C(V,j){var ee=V.getLastChild();let ne=j.getFirstChild();ee&&ne&&a(ee)&&a(ne)&&(C(ee.getFirstChild(),ne.getFirstChild()),ne.remove()),ee=j.getChildren(),0<ee.length&&(V.append(...ee),b(V)),j.remove()}function b(V,j){if(V=j||V.getChildren(),V!==void 0)for(j=0;j<V.length;j++){let W=V[j];if(P(W)){let J=W.getValue();var ee=W,ne=ee.getParent(),B=1;for(ne!=null&&(Q(ne)?B=ne.getStart():n(44)),ee=ee.getPreviousSiblings(),ne=0;ne<ee.length;ne++){let F=ee[ne];P(F)&&!Q(F.getFirstChild())&&B++}J!==B&&W.setValue(B)}}}function y(V){if(!a(V)){var j=V.getParent(),ee=j?j.getParent():void 0,ne=ee?ee.getParent():void 0;if(Q(ne)&&P(ee)&&Q(j)){var B=j?j.getFirstChild():void 0,W=j?j.getLastChild():void 0;if(V.is(B))ee.insertBefore(V),j.isEmpty()&&ee.remove();else if(V.is(W))ee.insertAfter(V),j.isEmpty()&&ee.remove();else{var J=j.getListType();B=k();let F=U(J);B.append(F),V.getPreviousSiblings().forEach(w=>F.append(w)),W=k(),J=U(J),W.append(J),g(J,V.getNextSiblings()),ee.insertBefore(B),ee.insertAfter(W),ee.replace(V)}b(j),b(ne)}}}class v extends e.ElementNode{static getType(){return"listitem"}static clone(j){return new v(j.__value,j.__checked,j.__key)}constructor(j,ee,ne){super(ne),this.__value=j===void 0?1:j,this.__checked=ee}createDOM(j){let ee=document.createElement("li"),ne=this.getParent();return Q(ne)&&ne.getListType()==="check"&&O(ee,this,null),ee.value=this.__value,T(ee,j.theme,this),ee}updateDOM(j,ee,ne){let B=this.getParent();return Q(B)&&B.getListType()==="check"&&O(ee,this,j),ee.value=this.__value,T(ee,ne.theme,this),!1}static transform(){return j=>{let ee=j.getParent();Q(ee)&&(b(ee),ee.getListType()!=="check"&&j.getChecked()!=null&&j.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:R,priority:0})}}static importJSON(j){let ee=k();return ee.setChecked(j.checked),ee.setValue(j.value),ee.setFormat(j.format),ee.setDirection(j.direction),ee}exportDOM(j){return j=this.createDOM(j._config),j.style.textAlign=this.getFormatType(),{element:j}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...j){for(let ee=0;ee<j.length;ee++){let ne=j[ee];if(e.$isElementNode(ne)&&this.canMergeWith(ne)){let B=ne.getChildren();this.append(...B),ne.remove()}else super.append(ne)}return this}replace(j,ee){if(P(j))return super.replace(j);this.setIndent(0);let ne=this.getParentOrThrow();if(!Q(ne))return j;if(ne.__first===this.getKey())ne.insertBefore(j);else if(ne.__last===this.getKey())ne.insertAfter(j);else{let B=U(ne.getListType()),W=this.getNextSibling();for(;W;){let J=W;W=W.getNextSibling(),B.append(J)}ne.insertAfter(j),j.insertAfter(B)}return ee&&this.getChildren().forEach(B=>{j.append(B)}),this.remove(),ne.getChildrenSize()===0&&ne.remove(),j}insertAfter(j,ee=!0){var ne=this.getParentOrThrow();Q(ne)||n(39);var B=this.getNextSiblings();if(P(j))return ee=super.insertAfter(j,ee),j=j.getParentOrThrow(),Q(j)&&b(j),ee;if(Q(j)){for(ne=j,j=j.getChildren(),B=j.length-1;0<=B;B--)ne=j[B],this.insertAfter(ne,ee);return ne}if(ne.insertAfter(j,ee),B.length!==0){let W=U(ne.getListType());B.forEach(J=>W.append(J)),j.insertAfter(W,ee)}return j}remove(j){let ee=this.getPreviousSibling(),ne=this.getNextSibling();super.remove(j),ee&&ne&&a(ee)&&a(ne)?(C(ee.getFirstChild(),ne.getFirstChild()),ne.remove()):ne&&(j=ne.getParent(),Q(j)&&b(j))}insertNewAfter(j,ee=!0){return j=k(this.__checked==null?void 0:!1),this.insertAfter(j,ee),j}collapseAtStart(j){let ee=e.$createParagraphNode();this.getChildren().forEach(J=>ee.append(J));var ne=this.getParentOrThrow(),B=ne.getParentOrThrow();let W=P(B);return ne.getChildrenSize()===1?W?(ne.remove(),B.select()):(ne.insertBefore(ee),ne.remove(),ne=j.anchor,j=j.focus,B=ee.getKey(),ne.type==="element"&&ne.getNode().is(this)&&ne.set(B,ne.offset,"element"),j.type==="element"&&j.getNode().is(this)&&j.set(B,j.offset,"element")):(ne.insertBefore(ee),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(j){this.getWritable().__value=j}getChecked(){return this.getLatest().__checked}setChecked(j){this.getWritable().__checked=j}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var j=this.getParent();if(j===null)return this.getLatest().__indent;j=j.getParentOrThrow();let ee=0;for(;P(j);)j=j.getParentOrThrow().getParentOrThrow(),ee++;return ee}setIndent(j){typeof j=="number"&&-1<j||n(117);let ee=this.getIndent();for(;ee!==j;)if(ee<j){e:{var ne=new Set;if(a(this)||ne.has(this.getKey()))break e;let F=this.getParent();var B=this.getNextSibling(),W=this.getPreviousSibling();if(a(B)&&a(W)){if(W=W.getFirstChild(),Q(W)){W.append(this);var J=B.getFirstChild();Q(J)&&(J=J.getChildren(),g(W,J),B.remove(),ne.add(B.getKey())),b(W)}}else a(B)?(B=B.getFirstChild(),Q(B)&&(ne=B.getFirstChild(),ne!==null&&ne.insertBefore(this),b(B))):a(W)?(B=W.getFirstChild(),Q(B)&&(B.append(this),b(B))):Q(F)&&(ne=k(),J=U(F.getListType()),ne.append(J),J.append(this),W?W.insertAfter(ne):B?B.insertBefore(ne):F.append(ne),b(J));Q(F)&&b(F)}ee++}else y(this),ee--;return this}insertBefore(j){if(P(j)){let ee=this.getParentOrThrow();if(Q(ee)){let ne=this.getNextSiblings();b(ee,ne)}}return super.insertBefore(j)}canInsertAfter(j){return P(j)}canReplaceWith(j){return P(j)}canMergeWith(j){return e.$isParagraphNode(j)||P(j)}extractWithChild(j,ee){if(!e.$isRangeSelection(ee))return!1;j=ee.anchor.getNode();let ne=ee.focus.getNode();return this.isParentOf(j)&&this.isParentOf(ne)&&this.getTextContent().length===ee.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return U("bullet")}}function T(V,j,ee){let ne=[],B=[];var W=(j=j.list)?j.listitem:void 0;if(j&&j.nested)var J=j.nested.listitem;if(W!==void 0&&(W=W.split(" "),ne.push(...W)),j){W=ee.getParent(),W=Q(W)&&W.getListType()==="check";let F=ee.getChecked();W&&!F||B.push(j.listitemUnchecked),W&&F||B.push(j.listitemChecked),W&&ne.push(F?j.listitemChecked:j.listitemUnchecked)}J!==void 0&&(J=J.split(" "),ee.getChildren().some(F=>Q(F))?ne.push(...J):B.push(...J)),0<B.length&&t.removeClassNamesFromElement(V,...B),0<ne.length&&t.addClassNamesToElement(V,...ne)}function O(V,j,ee){Q(j.getFirstChild())?(V.removeAttribute("role"),V.removeAttribute("tabIndex"),V.removeAttribute("aria-checked")):(V.setAttribute("role","checkbox"),V.setAttribute("tabIndex","-1"),ee&&j.__checked===ee.__checked||V.setAttribute("aria-checked",j.getChecked()?"true":"false"))}function R(V){return V=t.isHTMLElement(V)&&V.getAttribute("aria-checked")==="true",{node:k(V)}}function k(V){return e.$applyNodeReplacement(new v(void 0,V))}function P(V){return V instanceof v}class M extends e.ElementNode{static getType(){return"list"}static clone(j){return new M(j.__listType||Z[j.__tag],j.__start,j.__key)}constructor(j,ee,ne){super(ne),this.__listType=j=Z[j]||j,this.__tag=j==="number"?"ol":"ul",this.__start=ee}getTag(){return this.__tag}setListType(j){let ee=this.getWritable();ee.__listType=j,ee.__tag=j==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(j){let ee=document.createElement(this.__tag);return this.__start!==1&&ee.setAttribute("start",String(this.__start)),ee.__lexicalListType=this.__listType,Y(ee,j.theme,this),ee}updateDOM(j,ee,ne){return j.__tag!==this.__tag?!0:(Y(ee,ne.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:oe,priority:0}),ul:()=>({conversion:oe,priority:0})}}static importJSON(j){let ee=U(j.listType,j.start);return ee.setFormat(j.format),ee.setIndent(j.indent),ee.setDirection(j.direction),ee}exportDOM(j){return{element:j}=super.exportDOM(j),j&&t.isHTMLElement(j)&&(this.__start!==1&&j.setAttribute("start",String(this.__start)),this.__listType==="check"&&j.setAttribute("__lexicalListType","check")),{element:j}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...j){for(let ne=0;ne<j.length;ne++){var ee=j[ne];if(P(ee))super.append(ee);else{let B=k();Q(ee)||e.$isElementNode(ee)&&(ee=e.$createTextNode(ee.getTextContent())),B.append(ee),super.append(B)}}return b(this),this}extractWithChild(j){return P(j)}}function Y(V,j,ee){let ne=[],B=[];var W=j.list;if(W!==void 0){let F=W[`${ee.__tag}Depth`]||[];j=r(ee)-1;let w=j%F.length;var J=F[w];let N=W[ee.__tag],I;if(W=W.nested,W!==void 0&&W.list&&(I=W.list),N!==void 0&&ne.push(N),J!==void 0)for(J=J.split(" "),ne.push(...J),J=0;J<F.length;J++)J!==w&&B.push(ee.__tag+J);I!==void 0&&(ee=I.split(" "),1<j?ne.push(...ee):B.push(...ee))}0<B.length&&t.removeClassNamesFromElement(V,...B),0<ne.length&&t.addClassNamesToElement(V,...ne)}function X(V){let j=[];for(let ne=0;ne<V.length;ne++){var ee=V[ne];P(ee)?(j.push(ee),ee=ee.getChildren(),1<ee.length&&ee.forEach(B=>{Q(B)&&j.push(u(B))})):j.push(u(ee))}return j}function oe(V){let j=V.nodeName.toLowerCase(),ee=null;return j==="ol"?ee=U("number",V.start):j==="ul"&&(ee=t.isHTMLElement(V)&&V.getAttribute("__lexicallisttype")==="check"?U("check"):U("bullet")),{after:X,node:ee}}let Z={ol:"number",ul:"bullet"};function U(V,j=1){return e.$applyNodeReplacement(new M(V,j))}function Q(V){return V instanceof M}let de=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),pe=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),te=e.createCommand("INSERT_CHECK_LIST_COMMAND"),fe=e.createCommand("REMOVE_LIST_COMMAND");return Ar.$createListItemNode=k,Ar.$createListNode=U,Ar.$getListDepth=r,Ar.$handleListInsertParagraph=function(){var V=e.$getSelection();if(!e.$isRangeSelection(V)||!V.isCollapsed()||(V=V.anchor.getNode(),!P(V)||V.getChildrenSize()!==0))return!1;var j=o(V),ee=V.getParent();Q(ee)||n(40);let ne=ee.getParent(),B;if(e.$isRootOrShadowRoot(ne))B=e.$createParagraphNode(),j.insertAfter(B);else if(P(ne))B=k(),ne.insertAfter(B);else return!1;if(B.select(),j=V.getNextSiblings(),0<j.length){let W=U(ee.getListType());e.$isParagraphNode(B)?B.insertAfter(W):(ee=k(),ee.append(W),B.insertAfter(ee)),j.forEach(J=>{J.remove(),W.append(J)})}return l(V),!0},Ar.$isListItemNode=P,Ar.$isListNode=Q,Ar.INSERT_CHECK_LIST_COMMAND=te,Ar.INSERT_ORDERED_LIST_COMMAND=pe,Ar.INSERT_UNORDERED_LIST_COMMAND=de,Ar.ListItemNode=v,Ar.ListNode=M,Ar.REMOVE_LIST_COMMAND=fe,Ar.insertList=function(V,j){V.update(()=>{var ee=e.$getSelection();if(e.$INTERNAL_isPointSelection(ee)){var ne=ee.getNodes();ee=ee.anchor.getNode();var B=ee.getParent();if(p(ee,ne))ne=U(j),e.$isRootOrShadowRoot(B)?(ee.replace(ne),B=k(),e.$isElementNode(ee)&&(B.setFormat(ee.getFormatType()),B.setIndent(ee.getIndent())),ne.append(B)):P(ee)&&(ee=ee.getParentOrThrow(),g(ne,ee.getChildren()),ee.replace(ne));else for(ee=new Set,B=0;B<ne.length;B++){var W=ne[B];if(e.$isElementNode(W)&&W.isEmpty()&&!P(W)&&!ee.has(W.getKey()))_(W,j);else if(e.$isLeafNode(W))for(W=W.getParent();W!=null;){let F=W.getKey();if(Q(W)){if(!ee.has(F)){var J=U(j);g(J,W.getChildren()),W.replace(J),b(J),ee.add(F)}break}else{if(J=W.getParent(),e.$isRootOrShadowRoot(J)&&!ee.has(F)){ee.add(F),_(W,j);break}W=J}}}}})},Ar.removeList=function(V){V.update(()=>{let j=e.$getSelection();if(e.$isRangeSelection(j)){var ee=new Set,ne=j.getNodes(),B=j.anchor.getNode();if(p(B,ne))ee.add(o(B));else for(B=0;B<ne.length;B++){var W=ne[B];e.$isLeafNode(W)&&(W=t.$getNearestNodeOfType(W,v),W!=null&&ee.add(o(W)))}for(let J of ee){ee=J,ne=i(J);for(let F of ne)ne=e.$createParagraphNode(),g(ne,F.getChildren()),ee.insertAfter(ne),ee=ne,F.__key===j.anchor.key&&j.anchor.set(ne.getKey(),0,"element"),F.__key===j.focus.key&&j.focus.set(ne.getKey(),0,"element"),F.remove();J.remove()}}})},Ar}var w_,T_;function oy(){return T_||(T_=1,w_=process.env.NODE_ENV==="development"?v7():b7()),w_}var N_;function _7(){if(N_)return xp;N_=1;var e=oy(),t=cr(),n=H,r=vn(),o=Xt();function i(l){n.useEffect(()=>r.mergeRegister(l.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(l,"number"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(l,"bullet"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(l),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[l])}function a(){const[l]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!l.hasNodes([e.ListNode,e.ListItemNode]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[l]),i(l),null}return xp.ListPlugin=a,xp}var Ep={},S_;function x7(){if(S_)return Ep;S_=1;var e=oy(),t=cr(),n=H,r=vn(),o=Xt();function i(a){n.useEffect(()=>r.mergeRegister(a.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(a,"number"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(a,"bullet"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(a),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[a])}return Ep.ListPlugin=function(){let[a]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!a.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[a]),i(a),null},Ep}process.env.NODE_ENV==="development"?_7():x7();var Cp={},pi={},O_;function E7(){if(O_)return pi;O_=1;var e=vn(),t=Xt();const n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(y){return new r(y.__url,{rel:y.__rel,target:y.__target,title:y.__title},y.__key)}constructor(y,v={},T){super(T);const{target:O=null,rel:R=null,title:k=null}=v;this.__url=y,this.__target=O,this.__rel=R,this.__title=k}createDOM(y){const v=document.createElement("a");return v.href=this.sanitizeUrl(this.__url),this.__target!==null&&(v.target=this.__target),this.__rel!==null&&(v.rel=this.__rel),this.__title!==null&&(v.title=this.__title),e.addClassNamesToElement(v,y.theme.link),v}updateDOM(y,v,T){const O=this.__url,R=this.__target,k=this.__rel,P=this.__title;return O!==y.__url&&(v.href=O),R!==y.__target&&(R?v.target=R:v.removeAttribute("target")),k!==y.__rel&&(k?v.rel=k:v.removeAttribute("rel")),P!==y.__title&&(P?v.title=P:v.removeAttribute("title")),!1}static importDOM(){return{a:y=>({conversion:o,priority:1})}}static importJSON(y){const v=i(y.url,{rel:y.rel,target:y.target,title:y.title});return v.setFormat(y.format),v.setIndent(y.indent),v.setDirection(y.direction),v}sanitizeUrl(y){try{const v=new URL(y);if(!n.has(v.protocol))return"about:blank"}catch{return y}return y}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(y){const v=this.getWritable();v.__url=y}getTarget(){return this.getLatest().__target}setTarget(y){const v=this.getWritable();v.__target=y}getRel(){return this.getLatest().__rel}setRel(y){const v=this.getWritable();v.__rel=y}getTitle(){return this.getLatest().__title}setTitle(y){const v=this.getWritable();v.__title=y}insertNewAfter(y,v=!0){const T=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(T,v),T}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(y,v,T){if(!t.$isRangeSelection(v))return!1;const O=v.anchor.getNode(),R=v.focus.getNode();return this.isParentOf(O)&&this.isParentOf(R)&&v.getTextContent().length>0}}function o(b){let y=null;if(e.isHTMLAnchorElement(b)){const v=b.textContent;(v!==null&&v!==""||b.children.length>0)&&(y=i(b.getAttribute("href")||"",{rel:b.getAttribute("rel"),target:b.getAttribute("target"),title:b.getAttribute("title")}))}return{node:y}}function i(b,y){return t.$applyNodeReplacement(new r(b,y))}function a(b){return b instanceof r}class l extends r{static getType(){return"autolink"}static clone(y){return new l(y.__url,{rel:y.__rel,target:y.__target,title:y.__title},y.__key)}static importJSON(y){const v=u(y.url,{rel:y.rel,target:y.target,title:y.title});return v.setFormat(y.format),v.setIndent(y.indent),v.setDirection(y.direction),v}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(y,v=!0){const T=this.getParentOrThrow().insertNewAfter(y,v);if(t.$isElementNode(T)){const O=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return T.append(O),O}return null}}function u(b,y){return t.$applyNodeReplacement(new l(b,y))}function p(b){return b instanceof l}const g=t.createCommand("TOGGLE_LINK_COMMAND");function _(b,y={}){const{target:v,title:T}=y,O=y.rel===void 0?"noreferrer":y.rel,R=t.$getSelection();if(!t.$isRangeSelection(R))return;const k=R.extract();if(b===null)k.forEach(P=>{const M=P.getParent();if(a(M)){const Y=M.getChildren();for(let X=0;X<Y.length;X++)M.insertBefore(Y[X]);M.remove()}});else{if(k.length===1){const Y=k[0],X=C(Y,a);if(X!==null){X.setURL(b),v!==void 0&&X.setTarget(v),O!==null&&X.setRel(O),T!==void 0&&X.setTitle(T);return}}let P=null,M=null;k.forEach(Y=>{const X=Y.getParent();if(!(X===M||X===null||t.$isElementNode(Y)&&!Y.isInline())){if(a(X)){M=X,X.setURL(b),v!==void 0&&X.setTarget(v),O!==null&&M.setRel(O),T!==void 0&&M.setTitle(T);return}if(X.is(P)||(P=X,M=i(b,{rel:O,target:v,title:T}),a(X)?Y.getPreviousSibling()===null?X.insertBefore(M):X.insertAfter(M):Y.insertBefore(M)),a(Y)){if(Y.is(M))return;if(M!==null){const oe=Y.getChildren();for(let Z=0;Z<oe.length;Z++)M.append(oe[Z])}Y.remove();return}M!==null&&M.append(Y)}})}}function C(b,y){let v=b;for(;v!==null&&v.getParent()!==null&&!y(v);)v=v.getParentOrThrow();return y(v)?v:null}return pi.$createAutoLinkNode=u,pi.$createLinkNode=i,pi.$isAutoLinkNode=p,pi.$isLinkNode=a,pi.AutoLinkNode=l,pi.LinkNode=r,pi.TOGGLE_LINK_COMMAND=g,pi.toggleLink=_,pi}var gi={},A_;function C7(){if(A_)return gi;A_=1;var e=vn(),t=Xt();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(C){return new r(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}constructor(C,b={},y){super(y);let{target:v=null,rel:T=null,title:O=null}=b;this.__url=C,this.__target=v,this.__rel=T,this.__title=O}createDOM(C){let b=document.createElement("a");return b.href=this.sanitizeUrl(this.__url),this.__target!==null&&(b.target=this.__target),this.__rel!==null&&(b.rel=this.__rel),this.__title!==null&&(b.title=this.__title),e.addClassNamesToElement(b,C.theme.link),b}updateDOM(C,b){let y=this.__url,v=this.__target,T=this.__rel,O=this.__title;return y!==C.__url&&(b.href=y),v!==C.__target&&(v?b.target=v:b.removeAttribute("target")),T!==C.__rel&&(T?b.rel=T:b.removeAttribute("rel")),O!==C.__title&&(O?b.title=O:b.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(C){let b=i(C.url,{rel:C.rel,target:C.target,title:C.title});return b.setFormat(C.format),b.setIndent(C.indent),b.setDirection(C.direction),b}sanitizeUrl(C){try{let b=new URL(C);if(!n.has(b.protocol))return"about:blank"}catch{}return C}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(C){this.getWritable().__url=C}getTarget(){return this.getLatest().__target}setTarget(C){this.getWritable().__target=C}getRel(){return this.getLatest().__rel}setRel(C){this.getWritable().__rel=C}getTitle(){return this.getLatest().__title}setTitle(C){this.getWritable().__title=C}insertNewAfter(C,b=!0){return C=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(C,b),C}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(C,b){if(!t.$isRangeSelection(b))return!1;C=b.anchor.getNode();let y=b.focus.getNode();return this.isParentOf(C)&&this.isParentOf(y)&&0<b.getTextContent().length}}function o(_){let C=null;if(e.isHTMLAnchorElement(_)){let b=_.textContent;(b!==null&&b!==""||0<_.children.length)&&(C=i(_.getAttribute("href")||"",{rel:_.getAttribute("rel"),target:_.getAttribute("target"),title:_.getAttribute("title")}))}return{node:C}}function i(_,C){return t.$applyNodeReplacement(new r(_,C))}function a(_){return _ instanceof r}class l extends r{static getType(){return"autolink"}static clone(C){return new l(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}static importJSON(C){let b=u(C.url,{rel:C.rel,target:C.target,title:C.title});return b.setFormat(C.format),b.setIndent(C.indent),b.setDirection(C.direction),b}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(C,b=!0){return C=this.getParentOrThrow().insertNewAfter(C,b),t.$isElementNode(C)?(b=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),C.append(b),b):null}}function u(_,C){return t.$applyNodeReplacement(new l(_,C))}let p=t.createCommand("TOGGLE_LINK_COMMAND");function g(_,C){for(;_!==null&&_.getParent()!==null&&!C(_);)_=_.getParentOrThrow();return C(_)?_:null}return gi.$createAutoLinkNode=u,gi.$createLinkNode=i,gi.$isAutoLinkNode=function(_){return _ instanceof l},gi.$isLinkNode=a,gi.AutoLinkNode=l,gi.LinkNode=r,gi.TOGGLE_LINK_COMMAND=p,gi.toggleLink=function(_,C={}){let{target:b,title:y}=C,v=C.rel===void 0?"noreferrer":C.rel;if(C=t.$getSelection(),t.$isRangeSelection(C))if(C=C.extract(),_===null)C.forEach(T=>{if(T=T.getParent(),a(T)){let O=T.getChildren();for(let R=0;R<O.length;R++)T.insertBefore(O[R]);T.remove()}});else{if(C.length===1){let R=g(C[0],a);if(R!==null){R.setURL(_),b!==void 0&&R.setTarget(b),v!==null&&R.setRel(v),y!==void 0&&R.setTitle(y);return}}let T=null,O=null;C.forEach(R=>{var k=R.getParent();if(k!==O&&k!==null&&(!t.$isElementNode(R)||R.isInline()))if(a(k))O=k,k.setURL(_),b!==void 0&&k.setTarget(b),v!==null&&O.setRel(v),y!==void 0&&O.setTitle(y);else if(k.is(T)||(T=k,O=i(_,{rel:v,target:b,title:y}),a(k)?R.getPreviousSibling()===null?k.insertBefore(O):k.insertAfter(O):R.insertBefore(O)),a(R)){if(!R.is(O)){if(O!==null){k=R.getChildren();for(let P=0;P<k.length;P++)O.append(k[P])}R.remove()}}else O!==null&&O.append(R)})}},gi}var R_,$_;function iy(){return $_||($_=1,R_=process.env.NODE_ENV==="development"?E7():C7()),R_}var D_;function w7(){if(D_)return Cp;D_=1;var e=iy(),t=cr(),n=vn(),r=Xt(),o=H;function i({validateUrl:a}){const[l]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!l.hasNodes([e.LinkNode]))throw new Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(l.registerCommand(e.TOGGLE_LINK_COMMAND,u=>{if(u===null)return e.toggleLink(u),!0;if(typeof u=="string")return a===void 0||a(u)?(e.toggleLink(u),!0):!1;{const{url:p,target:g,rel:_,title:C}=u;return e.toggleLink(p,{rel:_,target:g,title:C}),!0}},r.COMMAND_PRIORITY_LOW),a!==void 0?l.registerCommand(r.PASTE_COMMAND,u=>{const p=r.$getSelection();if(!r.$isRangeSelection(p)||p.isCollapsed()||!(u instanceof ClipboardEvent)||u.clipboardData==null)return!1;const g=u.clipboardData.getData("text");return a(g)?p.getNodes().some(_=>r.$isElementNode(_))?!1:(l.dispatchCommand(e.TOGGLE_LINK_COMMAND,g),u.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[l,a]),null}return Cp.LinkPlugin=i,Cp}var wp={},k_;function T7(){if(k_)return wp;k_=1;var e=iy(),t=cr(),n=vn(),r=Xt(),o=H;return wp.LinkPlugin=function({validateUrl:i}){let[a]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!a.hasNodes([e.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(a.registerCommand(e.TOGGLE_LINK_COMMAND,l=>{if(l===null)return e.toggleLink(l),!0;if(typeof l=="string")return i===void 0||i(l)?(e.toggleLink(l),!0):!1;let{url:u,target:p,rel:g,title:_}=l;return e.toggleLink(u,{rel:g,target:p,title:_}),!0},r.COMMAND_PRIORITY_LOW),i!==void 0?a.registerCommand(r.PASTE_COMMAND,l=>{let u=r.$getSelection();if(!r.$isRangeSelection(u)||u.isCollapsed()||!(l instanceof ClipboardEvent)||l.clipboardData==null)return!1;let p=l.clipboardData.getData("text");return i(p)?u.getNodes().some(g=>r.$isElementNode(g))?!1:(a.dispatchCommand(e.TOGGLE_LINK_COMMAND,p),l.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[a,i]),null},wp}process.env.NODE_ENV==="development"?w7():T7();var Tp={},tn={},M_;function N7(){if(M_)return tn;M_=1;var e=Xt(),t=vn();const n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(me){const _e=new o(me.__headerState,me.__colSpan,me.__width,me.__key);return _e.__rowSpan=me.__rowSpan,_e.__backgroundColor=me.__backgroundColor,_e}static importDOM(){return{td:me=>({conversion:i,priority:0}),th:me=>({conversion:i,priority:0})}}static importJSON(me){const _e=me.colSpan||1,De=me.rowSpan||1,Fe=a(me.headerState,_e,me.width||void 0);return Fe.__rowSpan=De,Fe.__backgroundColor=me.backgroundColor||null,Fe}constructor(me=r.NO_STATUS,_e=1,De,Fe){super(_e,Fe),this.__headerState=me,this.__width=De,this.__backgroundColor=null}createDOM(me){const _e=document.createElement(this.getTag());return this.__width&&(_e.style.width=`${this.__width}px`),this.__colSpan>1&&(_e.colSpan=this.__colSpan),this.__rowSpan>1&&(_e.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(_e.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(_e,me.theme.tableCell,this.hasHeader()&&me.theme.tableCellHeader),_e}exportDOM(me){const{element:_e}=super.exportDOM(me);if(_e){const De=_e,Fe=700,ke=this.getParentOrThrow().getChildrenSize();De.style.border="1px solid black",this.__colSpan>1&&(De.colSpan=this.__colSpan),this.__rowSpan>1&&(De.rowSpan=this.__rowSpan),De.style.width=`${this.getWidth()||Math.max(90,Fe/ke)}px`,De.style.verticalAlign="top",De.style.textAlign="start";const ze=this.getBackgroundColor();ze!==null?De.style.backgroundColor=ze:this.hasHeader()&&(De.style.backgroundColor="#f2f3f5")}return{element:_e}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(me){const _e=this.getWritable();return _e.__headerState=me,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(me){const _e=this.getWritable();return _e.__width=me,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(me){this.getWritable().__backgroundColor=me}toggleHeaderStyle(me){const _e=this.getWritable();return(_e.__headerState&me)===me?_e.__headerState-=me:_e.__headerState+=me,_e}hasHeaderState(me){return(this.getHeaderStyles()&me)===me}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(me){return me.__headerState!==this.__headerState||me.__width!==this.__width||me.__colSpan!==this.__colSpan||me.__rowSpan!==this.__rowSpan||me.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(Se){const me=Se,_e=Se.nodeName.toLowerCase();let De;n.test(me.style.width)&&(De=parseFloat(me.style.width));const Fe=a(_e==="th"?r.ROW:r.NO_STATUS,me.colSpan,De);Fe.__rowSpan=me.rowSpan;const ke=me.style.backgroundColor;return ke!==""&&(Fe.__backgroundColor=ke),{forChild:(ze,tt)=>{if(l(tt)&&!e.$isElementNode(ze)){const ut=e.$createParagraphNode();return e.$isLineBreakNode(ze)&&ze.getTextContent()===`
|
|
274
|
+
`?null:(ut.append(ze),ut)}return ze},node:Fe}}function a(Se,me=1,_e){return e.$applyNodeReplacement(new o(Se,me,_e))}function l(Se){return Se instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(me){return new u(me.__height,me.__key)}static importDOM(){return{tr:me=>({conversion:p,priority:0})}}static importJSON(me){return g(me.height)}constructor(me,_e){super(_e),this.__height=me}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(me){const _e=document.createElement("tr");return this.__height&&(_e.style.height=`${this.__height}px`),t.addClassNamesToElement(_e,me.theme.tableRow),_e}isShadowRoot(){return!0}setHeight(me){const _e=this.getWritable();return _e.__height=me,this.__height}getHeight(){return this.getLatest().__height}updateDOM(me){return me.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(Se){const me=Se;let _e;return n.test(me.style.height)&&(_e=parseFloat(me.style.height)),{node:g(_e)}}function g(Se){return e.$applyNodeReplacement(new u(Se))}function _(Se){return Se instanceof u}const C=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b=Se=>C?(Se||window).getSelection():null;class y{constructor(me,_e){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=_e,this.editor=me,this.grid={cells:[],columns:0,rows:0},this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(me=>me())}trackTableGrid(){const me=new MutationObserver(_e=>{this.editor.update(()=>{let De=!1;for(let ke=0;ke<_e.length;ke++){const ze=_e[ke].target.nodeName;if(ze==="TABLE"||ze==="TR"){De=!0;break}}if(!De)return;const Fe=this.editor.getElementByKey(this.tableNodeKey);if(!Fe)throw new Error("Expected to find TableElement in DOM");this.grid=P(Fe)})});this.editor.update(()=>{const _e=this.editor.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");this.grid=P(_e),me.observe(_e,{childList:!0,subtree:!0})})}clearHighlight(){const me=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=me.getElementByKey(this.tableNodeKey);if(!De)throw new Error("Expected to find TableElement in DOM");const Fe=P(De);M(me,Fe,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(_e,me._config.theme.tableSelection),_e.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.addClassNamesToElement(_e,me._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(me){if(me!=null&&me.gridKey===this.tableNodeKey){const _e=this.editor;this.gridSelection=me,this.isHighlightingCells=!0,this.disableHighlightStyle(),M(_e,this.grid,this.gridSelection)}else me==null?this.clearHighlight():(this.tableNodeKey=me.gridKey,this.updateTableGridSelection(me))}setFocusCellForSelection(me,_e=!1){const De=this.editor;De.update(()=>{const Fe=e.$getNodeByKey(this.tableNodeKey);if(!w(Fe))throw new Error("Expected TableNode.");if(!De.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const ke=me.x,ze=me.y;if(this.focusCell=me,this.anchorCell!==null){const tt=b(De._window);tt&&tt.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ke||this.anchorY!==ze||_e))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ke===this.focusX&&ze===this.focusY)return;if(this.focusX=ke,this.focusY=ze,this.isHighlightingCells){const tt=e.$getNearestNodeFromDOMNode(me.elem);if(this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(tt)){const ut=tt.getKey();this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ut,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),De.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),M(De,this.grid,this.gridSelection)}}})}setAnchorCellForSelection(me){this.isHighlightingCells=!1,this.anchorCell=me,this.anchorX=me.x,this.anchorY=me.y,this.editor.update(()=>{const _e=e.$getNearestNodeFromDOMNode(me.elem);if(l(_e)){const De=_e.getKey();this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=De}})}formatCells(me){this.editor.update(()=>{const _e=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(_e))throw Error("Expected grid selection");const De=e.$createRangeSelection(),Fe=De.anchor,ke=De.focus;_e.getNodes().forEach(ze=>{l(ze)&&ze.getTextContentSize()!==0&&(Fe.set(ze.getKey(),0,"element"),ke.set(ze.getKey(),ze.getChildrenSize(),"element"),De.formatText(me))}),e.$setSelection(_e),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){const me=this.editor;me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(De))throw Error("Expected grid selection");const Fe=De.getNodes().filter(l);if(Fe.length===this.grid.columns*this.grid.rows){_e.selectPrevious(),_e.remove(),e.$getRoot().selectStart();return}Fe.forEach(ke=>{if(e.$isElementNode(ke)){const ze=e.$createParagraphNode(),tt=e.$createTextNode();ze.append(tt),ke.append(ze),ke.getChildren().forEach(ut=>{ut!==ze&&ut.remove()})}}),M(me,this.grid,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}}const v="__lexicalTableSelection";function T(Se,me,_e,De){const Fe=_e.getRootElement();if(Fe===null)throw new Error("No root element.");const ke=new y(_e,Se.getKey()),ze=_e._window||window;O(me,ke),me.addEventListener("mousedown",Qe=>{setTimeout(()=>{if(Qe.button!==0||!ze)return;const et=k(Qe.target);et!==null&&(ne(Qe),ke.setAnchorCellForSelection(et));const lt=()=>{ze.removeEventListener("mouseup",lt),ze.removeEventListener("mousemove",wt)},wt=_t=>{const Rt=k(_t.target);Rt!==null&&(ke.anchorX!==Rt.x||ke.anchorY!==Rt.y)&&(_t.preventDefault(),ke.setFocusCellForSelection(Rt))};ze.addEventListener("mouseup",lt),ze.addEventListener("mousemove",wt)},0)});const tt=Qe=>{Qe.button===0&&_e.update(()=>{const et=e.$getSelection(),lt=Qe.target;e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&Fe.contains(lt)&&ke.clearHighlight()})};ze.addEventListener("mousedown",tt),ke.listenersToRemove.add(()=>ze.removeEventListener("mousedown",tt)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_DOWN_COMMAND,Qe=>ee(_e,Qe,"down",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_UP_COMMAND,Qe=>ee(_e,Qe,"up",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_LEFT_COMMAND,Qe=>ee(_e,Qe,"backward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,Qe=>ee(_e,Qe,"forward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ESCAPE_COMMAND,Qe=>{const et=e.$getSelection();if(e.DEPRECATED_$isGridSelection(et)){const lt=t.$findMatchingParent(et.focus.getNode(),l);if(l(lt))return ne(Qe),lt.selectEnd(),!0}return!1},e.COMMAND_PRIORITY_HIGH));const ut=Qe=>()=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),kt=>l(kt));if(!l(lt))return!1;const wt=et.anchor.getNode(),_t=et.focus.getNode(),Rt=Se.isParentOf(wt),qe=Se.isParentOf(_t);if(Rt&&!qe||qe&&!Rt)return ke.clearText(),!0;const ot=t.$findMatchingParent(et.anchor.getNode(),kt=>e.$isElementNode(kt)),yt=ot&&t.$findMatchingParent(ot,kt=>e.$isElementNode(kt)&&l(kt.getParent()));if(!e.$isElementNode(yt)||!e.$isElementNode(ot))return!1;if(Qe===e.DELETE_LINE_COMMAND&&yt.getPreviousSibling()===null)return!0;if((Qe===e.DELETE_CHARACTER_COMMAND||Qe===e.DELETE_WORD_COMMAND)&&et.isCollapsed()&&et.anchor.offset===0&&ot!==yt){const kt=ot.getChildren(),Dt=e.$createParagraphNode();return kt.forEach(Kt=>Dt.append(Kt)),ot.replace(Dt),ot.getWritable().__parent=lt.getKey(),!0}}return!1};[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(Qe=>{ke.listenersToRemove.add(_e.registerCommand(Qe,ut(Qe),e.COMMAND_PRIORITY_CRITICAL))});const Et=Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return Qe.preventDefault(),Qe.stopPropagation(),ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1};ke.listenersToRemove.add(_e.registerCommand(e.KEY_BACKSPACE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_DELETE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FORMAT_TEXT_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.formatCells(Qe),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearHighlight(),!1;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),De&&ke.listenersToRemove.add(_e.registerCommand(e.KEY_TAB_COMMAND,Qe=>{const et=e.$getSelection();if(!e.$isRangeSelection(et)||!et.isCollapsed()||!Q(et,Se))return!1;const lt=V(et.anchor.getNode());if(lt===null)return!1;ne(Qe);const wt=Se.getCordsFromCellNode(lt,ke.grid);return Z(ke,Se,wt.x,wt.y,Qe.shiftKey?"backward":"forward"),!0},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FOCUS_COMMAND,Qe=>Se.isSelected(),e.COMMAND_PRIORITY_HIGH));function Bt(Qe){const et=Se.getCordsFromCellNode(Qe,ke.grid);return Se.getCellFromCordsOrThrow(et.x,et.y,ke.grid)}return ke.listenersToRemove.add(_e.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{const Qe=e.$getSelection(),et=e.$getPreviousSelection();if(e.$isRangeSelection(Qe)){const{anchor:lt,focus:wt}=Qe,_t=lt.getNode(),Rt=wt.getNode(),qe=V(_t),ot=V(Rt),yt=qe&&Se.is(j(qe)),kt=ot&&Se.is(j(ot)),Dt=yt!==kt,Kt=yt&&kt,sn=Qe.isBackward();if(Dt){const ur=Qe.clone();ur.focus.set(Se.getKey(),sn?0:Se.getChildrenSize(),"element"),e.$setSelection(ur),X(_e,ke)}else Kt&&(qe.is(ot)||(ke.setAnchorCellForSelection(Bt(qe)),ke.setFocusCellForSelection(Bt(ot),!0)))}return Qe&&!Qe.is(et)&&(e.DEPRECATED_$isGridSelection(Qe)||e.DEPRECATED_$isGridSelection(et))&&ke.gridSelection&&!ke.gridSelection.is(et)?(e.DEPRECATED_$isGridSelection(Qe)&&Qe.gridKey===ke.tableNodeKey?ke.updateTableGridSelection(Qe):!e.DEPRECATED_$isGridSelection(Qe)&&e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&ke.updateTableGridSelection(null),!1):(ke.hasHijackedSelectionStyles&&!Se.isSelected()?oe(_e,ke):!ke.hasHijackedSelectionStyles&&Se.isSelected()&&X(_e,ke),!1)},e.COMMAND_PRIORITY_CRITICAL)),ke}function O(Se,me){Se[v]=me}function R(Se){return Se[v]}function k(Se){let me=Se;for(;me!=null;){const _e=me.nodeName;if(_e==="TD"||_e==="TH"){const De=me._cell;return De===void 0?null:De}me=me.parentNode}return null}function P(Se){const me=[],_e={cells:me,columns:0,rows:0};let De=Se.firstChild,Fe=0,ke=0;for(me.length=0;De!=null;){const ze=De.nodeName;if(ze==="TD"||ze==="TH"){const Et=De,Bt={elem:Et,hasBackgroundColor:Et.style.backgroundColor!=="",highlighted:!1,x:Fe,y:ke};De._cell=Bt;let Qe=me[ke];Qe===void 0&&(Qe=me[ke]=[]),Qe[Fe]=Bt}else{const Et=De.firstChild;if(Et!=null){De=Et;continue}}const tt=De.nextSibling;if(tt!=null){Fe++,De=tt;continue}const ut=De.parentNode;if(ut!=null){const Et=ut.nextSibling;if(Et==null)break;ke++,Fe=0,De=Et}}return _e.columns=Fe+1,_e.rows=ke+1,_e}function M(Se,me,_e){const De=new Set(_e?_e.getNodes():[]);Y(me,(Fe,ke)=>{const ze=Fe.elem;De.has(ke)?(Fe.highlighted=!0,te(Se,Fe)):(Fe.highlighted=!1,fe(Se,Fe),ze.getAttribute("style")||ze.removeAttribute("style"))})}function Y(Se,me){const{cells:_e}=Se;for(let De=0;De<_e.length;De++){const Fe=_e[De];if(Fe)for(let ke=0;ke<Fe.length;ke++){const ze=Fe[ke];if(!ze)continue;const tt=e.$getNearestNodeFromDOMNode(ze.elem);tt!==null&&me(ze,tt,{x:ke,y:De})}}}function X(Se,me){me.disableHighlightStyle(),Y(me.grid,_e=>{_e.highlighted=!0,te(Se,_e)})}function oe(Se,me){me.enableHighlightStyle(),Y(me.grid,_e=>{const De=_e.elem;_e.highlighted=!1,fe(Se,_e),De.getAttribute("style")||De.removeAttribute("style")})}const Z=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)?de(me.getCellNodeFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid),ke):De!==(ke?Se.grid.rows-1:0)?de(me.getCellNodeFromCordsOrThrow(ke?0:Se.grid.columns-1,De+(ke?1:-1),Se.grid),ke):ke?me.selectNext():me.selectPrevious(),!0;case"up":return De!==0?de(me.getCellNodeFromCordsOrThrow(_e,De-1,Se.grid),!1):me.selectPrevious(),!0;case"down":return De!==Se.grid.rows-1?de(me.getCellNodeFromCordsOrThrow(_e,De+1,Se.grid),!0):me.selectNext(),!0;default:return!1}},U=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)&&Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid)),!0;case"up":return De!==0?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De-1,Se.grid)),!0):!1;case"down":return De!==Se.grid.rows-1?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De+1,Se.grid)),!0):!1;default:return!1}};function Q(Se,me){if(e.$isRangeSelection(Se)||e.DEPRECATED_$isGridSelection(Se)){const _e=me.isParentOf(Se.anchor.getNode()),De=me.isParentOf(Se.focus.getNode());return _e&&De}return!1}function de(Se,me){me?Se.selectStart():Se.selectEnd()}const pe="172,206,247";function te(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null?_e.style.setProperty("background-color",`rgb(${pe})`):_e.style.setProperty("background-image",`linear-gradient(to right, rgba(${pe},0.85), rgba(${pe},0.85))`),_e.style.setProperty("caret-color","transparent")}function fe(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null&&_e.style.removeProperty("background-color"),_e.style.removeProperty("background-image"),_e.style.removeProperty("caret-color")}function V(Se){const me=t.$findMatchingParent(Se,l);return l(me)?me:null}function j(Se){const me=t.$findMatchingParent(Se,w);return w(me)?me:null}function ee(Se,me,_e,De,Fe){const ke=e.$getSelection();if(!Q(ke,De))return!1;if(e.$isRangeSelection(ke)&&ke.isCollapsed()){if(_e==="backward"||_e==="forward")return!1;const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l);if(!l(ut)||!ut.is(Et))return!1;const Bt=j(ut);if(Bt!==De&&Bt!=null){const qe=Se.getElementByKey(Bt.getKey());if(qe!=null)return Fe.grid=P(qe),ee(Se,me,_e,Bt,Fe)}const Qe=Se.getElementByKey(ut.__key),et=Se.getElementByKey(ze.key);if(et==null||Qe==null)return!1;let lt;if(ze.type==="element")lt=et.getBoundingClientRect();else{const qe=window.getSelection();if(qe===null||qe.rangeCount===0)return!1;lt=qe.getRangeAt(0).getBoundingClientRect()}const wt=_e==="up"?ut.getFirstChild():ut.getLastChild();if(wt==null)return!1;const _t=Se.getElementByKey(wt.__key);if(_t==null)return!1;const Rt=_t.getBoundingClientRect();if(_e==="up"?Rt.top>lt.top-lt.height:lt.bottom+lt.height>Rt.bottom){ne(me);const qe=De.getCordsFromCellNode(ut,Fe.grid);if(me.shiftKey){const ot=De.getCellFromCordsOrThrow(qe.x,qe.y,Fe.grid);Fe.setAnchorCellForSelection(ot),Fe.setFocusCellForSelection(ot,!0)}else return Z(Fe,De,qe.x,qe.y,_e);return!0}}else if(e.DEPRECATED_$isGridSelection(ke)){const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l),[Bt]=ke.getNodes(),Qe=Se.getElementByKey(Bt.getKey());if(!l(ut)||!l(Et)||!w(Bt)||Qe==null)return!1;Fe.updateTableGridSelection(ke);const et=P(Qe),lt=De.getCordsFromCellNode(ut,et),wt=De.getCellFromCordsOrThrow(lt.x,lt.y,et);if(Fe.setAnchorCellForSelection(wt),ne(me),me.shiftKey){const _t=De.getCordsFromCellNode(Et,et);return U(Fe,Bt,_t.x,_t.y,_e)}else Et.selectEnd();return!0}return!1}function ne(Se){Se.preventDefault(),Se.stopImmediatePropagation(),Se.stopPropagation()}class B extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(me){return new B(me.__key)}static importDOM(){return{table:me=>({conversion:J,priority:1})}}static importJSON(me){return F()}constructor(me){super(me)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(me,_e){const De=document.createElement("table");return t.addClassNamesToElement(De,me.theme.table),De}updateDOM(){return!1}exportDOM(me){return{...super.exportDOM(me),after:_e=>{if(_e){const De=_e.cloneNode(),Fe=document.createElement("colgroup"),ke=document.createElement("tbody");t.isHTMLElement(_e)&&ke.append(..._e.children);const ze=this.getFirstChildOrThrow();if(!_(ze))throw new Error("Expected to find row node.");const tt=ze.getChildrenSize();for(let ut=0;ut<tt;ut++){const Et=document.createElement("col");Fe.append(Et)}return De.replaceChildren(Fe,ke),De}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(me,_e){const{rows:De,cells:Fe}=_e;for(let ke=0;ke<De;ke++){const ze=Fe[ke];if(ze==null)continue;const tt=ze.findIndex(ut=>{if(!ut)return;const{elem:Et}=ut;return e.$getNearestNodeFromDOMNode(Et)===me});if(tt!==-1)return{x:tt,y:ke}}throw new Error("Cell not found in table.")}getCellFromCords(me,_e,De){const{cells:Fe}=De,ke=Fe[_e];return ke==null?null:ke[me]??null}getCellFromCordsOrThrow(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(!Fe)throw new Error("Cell not found at cords.");return Fe}getCellNodeFromCords(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(Fe==null)return null;const ke=e.$getNearestNodeFromDOMNode(Fe.elem);return l(ke)?ke:null}getCellNodeFromCordsOrThrow(me,_e,De){const Fe=this.getCellNodeFromCords(me,_e,De);if(!Fe)throw new Error("Node at cords not TableCellNode.");return Fe}canSelectBefore(){return!0}canIndent(){return!1}}function W(Se,me){const _e=Se.getElementByKey(me.getKey());if(_e==null)throw new Error("Table Element Not Found");return P(_e)}function J(Se){return{node:F()}}function F(){return e.$applyNodeReplacement(new B)}function w(Se){return Se instanceof B}function N(Se,me,_e=!0){const De=F();for(let Fe=0;Fe<Se;Fe++){const ke=g();for(let ze=0;ze<me;ze++){let tt=r.NO_STATUS;typeof _e=="object"?(Fe===0&&_e.rows&&(tt|=r.ROW),ze===0&&_e.columns&&(tt|=r.COLUMN)):_e&&(Fe===0&&(tt|=r.ROW),ze===0&&(tt|=r.COLUMN));const ut=a(tt),Et=e.$createParagraphNode();Et.append(e.$createTextNode()),ut.append(Et),ke.append(ut)}De.append(ke)}return De}function I(Se){const me=t.$findMatchingParent(Se,_e=>l(_e));return l(me)?me:null}function q(Se){const me=t.$findMatchingParent(Se,_e=>_(_e));if(_(me))return me;throw new Error("Expected table cell to be inside of table row.")}function ue(Se){const me=t.$findMatchingParent(Se,_e=>w(_e));if(w(me))return me;throw new Error("Expected table cell to be inside of table.")}function he(Se){const me=q(Se);return ue(me).getChildren().findIndex(_e=>_e.is(me))}function se(Se){return q(Se).getChildren().findIndex(me=>me.is(Se))}function Ce(Se,me){const _e=ue(Se),{x:De,y:Fe}=_e.getCordsFromCellNode(Se,me);return{above:_e.getCellNodeFromCords(De,Fe-1,me),below:_e.getCellNodeFromCords(De,Fe+1,me),left:_e.getCellNodeFromCords(De-1,Fe,me),right:_e.getCellNodeFromCords(De+1,Fe,me)}}function Oe(Se,me){const _e=Se.getChildren();if(me>=_e.length||me<0)throw new Error("Expected table cell to be inside of table row.");return _e[me].remove(),Se}function Be(Se,me,_e=!0,De,Fe){const ke=Se.getChildren();if(me>=ke.length||me<0)throw new Error("Table row target index out of range");const ze=ke[me];if(_(ze))for(let tt=0;tt<De;tt++){const ut=ze.getChildren(),Et=ut.length,Bt=g();for(let Qe=0;Qe<Et;Qe++){const et=ut[Qe];if(!l(et))throw Error("Expected table cell");const{above:lt,below:wt}=Ce(et,Fe);let _t=r.NO_STATUS;const Rt=lt&<.getWidth()||wt&&wt.getWidth()||void 0;(lt&<.hasHeaderState(r.COLUMN)||wt&&wt.hasHeaderState(r.COLUMN))&&(_t|=r.COLUMN);const qe=a(_t,1,Rt);qe.append(e.$createParagraphNode()),Bt.append(qe)}_e?ze.insertAfter(Bt):ze.insertBefore(Bt)}else throw new Error("Row before insertion index does not exist.");return Se}function ce(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a INTERNAL_PointSelection");const _e=me.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,ze]=e.DEPRECATED_$computeGridMap(Fe,De,De),tt=ke[0].length,{startRow:ut}=ze;if(Se){const Et=ut+De.__rowSpan-1,Bt=ke[Et],Qe=g();for(let lt=0;lt<tt;lt++){const{cell:wt,startRow:_t}=Bt[lt];_t+wt.__rowSpan-1<=Et?Qe.append(a(r.NO_STATUS)):wt.setRowSpan(wt.__rowSpan+1)}const et=Fe.getChildAtIndex(Et);if(!e.DEPRECATED_$isGridRowNode(et))throw Error("focusEndRow is not a GridRowNode");et.insertAfter(Qe)}else{const Et=ke[ut],Bt=g();for(let et=0;et<tt;et++){const{cell:lt,startRow:wt}=Et[et];wt===ut?Bt.append(a(r.NO_STATUS)):lt.setRowSpan(lt.__rowSpan+1)}const Qe=Fe.getChildAtIndex(ut);if(!e.DEPRECATED_$isGridRowNode(Qe))throw Error("focusEndRow is not a GridRowNode");Qe.insertBefore(Bt)}}function le(Se,me,_e=!0,De,Fe){const ke=Se.getChildren(),ze=[];for(let tt=0;tt<ke.length;tt++){const ut=ke[tt];if(_(ut))for(let Et=0;Et<De;Et++){const Bt=ut.getChildren();if(me>=Bt.length||me<0)throw new Error("Table column target index out of range");const Qe=Bt[me];if(!l(Qe))throw Error("Expected table cell");const{left:et,right:lt}=Ce(Qe,Fe);let wt=r.NO_STATUS;(et&&et.hasHeaderState(r.ROW)||lt&<.hasHeaderState(r.ROW))&&(wt|=r.ROW);const _t=a(wt);_t.append(e.$createParagraphNode()),ze.push({newTableCell:_t,targetCell:Qe})}}return ze.forEach(({newTableCell:tt,targetCell:ut})=>{_e?ut.insertAfter(tt):ut.insertBefore(tt)}),Se}function ve(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a PointSeleciton");const _e=me.anchor.getNode(),De=me.focus.getNode(),[Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,,ze]=e.DEPRECATED_$getNodeTriplet(De),[tt,ut,Et]=e.DEPRECATED_$computeGridMap(ze,ke,Fe),Bt=tt.length,Qe=Se?Math.max(ut.startColumn,Et.startColumn):Math.min(ut.startColumn,Et.startColumn),et=Se?Qe+ke.__colSpan-1:Qe-1,lt=ze.getFirstChild();if(!e.DEPRECATED_$isGridRowNode(lt))throw Error("Expected firstTable child to be a row");let wt=null;function _t(){const qe=a(r.NO_STATUS).append(e.$createParagraphNode());return wt===null&&(wt=qe),qe}let Rt=lt;e:for(let qe=0;qe<Bt;qe++){if(qe!==0){const Kt=Rt.getNextSibling();if(!e.DEPRECATED_$isGridRowNode(Kt))throw Error("Expected row nextSibling to be a row");Rt=Kt}const ot=tt[qe];if(et<0){st(Rt,_t());continue}const{cell:yt,startColumn:kt,startRow:Dt}=ot[et];if(kt+yt.__colSpan-1<=et){let Kt=yt,sn=Dt,ur=et;for(;sn!==qe&&Kt.__rowSpan>1;)if(ur-=yt.__colSpan,ur>=0){const{cell:Er,startRow:Jo}=ot[ur];Kt=Er,sn=Jo}else{Rt.append(_t());continue e}Kt.insertAfter(_t())}else yt.setColSpan(yt.__colSpan+1)}wt!==null&&Xe(wt)}function Me(Se,me){const _e=Se.getChildren();for(let De=0;De<_e.length;De++){const Fe=_e[De];if(_(Fe)){const ke=Fe.getChildren();if(me>=ke.length||me<0)throw new Error("Table column target index out of range");ke[me].remove()}}return Se}function Pe(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startRow:Et}=tt,{startRow:Bt}=ut,Qe=Bt+ke.__rowSpan-1;if(ze.length===Qe-Et+1){Fe.remove();return}const et=ze[0].length,lt=ze[Qe+1],wt=Fe.getChildAtIndex(Qe+1);for(let _t=Qe;_t>=Et;_t--){for(let qe=et-1;qe>=0;qe--){const{cell:ot,startRow:yt,startColumn:kt}=ze[_t][qe];if(kt===qe&&(_t===Et&&yt<Et&&ot.setRowSpan(ot.__rowSpan-(yt-Et)),yt>=Et&&yt+ot.__rowSpan-1>Qe)){if(ot.setRowSpan(ot.__rowSpan-(Qe-yt+1)),wt===null)throw Error("Expected nextRowNode not to be null");if(qe===0)st(wt,ot);else{const{cell:Dt}=lt[qe-1];Dt.insertAfter(ot)}}}const Rt=Fe.getChildAtIndex(_t);if(!e.DEPRECATED_$isGridRowNode(Rt))throw Error(`Expected GridNode childAtIndex(${String(_t)}) to be RowNode`);Rt.remove()}if(lt!==void 0){const{cell:_t}=lt[0];Xe(_t)}else{const _t=ze[Et-1],{cell:Rt}=_t[0];Xe(Rt)}}function We(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startColumn:Et}=tt,{startRow:Bt,startColumn:Qe}=ut,et=Math.min(Et,Qe),lt=Math.max(Et+De.__colSpan-1,Qe+ke.__colSpan-1),wt=lt-et+1;if(ze[0].length===lt-et+1){Fe.selectPrevious(),Fe.remove();return}const _t=ze.length;for(let ot=0;ot<_t;ot++)for(let yt=et;yt<=lt;yt++){const{cell:kt,startColumn:Dt}=ze[ot][yt];if(Dt<et){if(yt===et){const Kt=et-Dt;kt.setColSpan(kt.__colSpan-Math.min(wt,kt.__colSpan-Kt))}}else if(Dt+kt.__colSpan-1>lt){if(yt===lt){const Kt=lt-Dt+1;kt.setColSpan(kt.__colSpan-Kt)}}else kt.remove()}const Rt=ze[Bt],qe=Rt[Qe+ke.__colSpan];if(qe!==void 0){const{cell:ot}=qe;Xe(ot)}else{const ot=Rt[Qe-1],{cell:yt}=ot;Xe(yt)}}function Xe(Se){const me=Se.getFirstDescendant();me==null?Se.selectStart():me.getParentOrThrow().selectStart()}function st(Se,me){const _e=Se.getFirstChild();_e!==null?_e.insertBefore(me):Se.append(me)}function dt(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),[_e,De,Fe]=e.DEPRECATED_$getNodeTriplet(me),ke=_e.__colSpan,ze=_e.__rowSpan;if(ke>1){for(let tt=1;tt<ke;tt++)_e.insertAfter(a(r.NO_STATUS));_e.setColSpan(1)}if(ze>1){const[tt,ut]=e.DEPRECATED_$computeGridMap(Fe,_e,_e),{startColumn:Et,startRow:Bt}=ut;let Qe;for(let et=1;et<ze;et++){const lt=Bt+et,wt=tt[lt];if(Qe=(Qe||De).getNextSibling(),!e.DEPRECATED_$isGridRowNode(Qe))throw Error("Expected row next sibling to be a row");let _t=null;for(let Rt=0;Rt<Et;Rt++){const qe=wt[Rt],ot=qe.cell;qe.startRow===lt&&(_t=ot),ot.__colSpan>1&&(Rt+=ot.__colSpan-1)}if(_t===null)for(let Rt=0;Rt<ke;Rt++)st(Qe,a(r.NO_STATUS));else for(let Rt=0;Rt<ke;Rt++)_t.insertAfter(a(r.NO_STATUS))}_e.setRowSpan(1)}}const Ct=e.createCommand("INSERT_TABLE_COMMAND");return tn.$createTableCellNode=a,tn.$createTableNode=F,tn.$createTableNodeWithDimensions=N,tn.$createTableRowNode=g,tn.$deleteTableColumn=Me,tn.$deleteTableColumn__EXPERIMENTAL=We,tn.$deleteTableRow__EXPERIMENTAL=Pe,tn.$getElementGridForTableNode=W,tn.$getTableCellNodeFromLexicalNode=I,tn.$getTableColumnIndexFromTableCellNode=se,tn.$getTableNodeFromLexicalNodeOrThrow=ue,tn.$getTableRowIndexFromTableCellNode=he,tn.$getTableRowNodeFromTableCellNodeOrThrow=q,tn.$insertTableColumn=le,tn.$insertTableColumn__EXPERIMENTAL=ve,tn.$insertTableRow=Be,tn.$insertTableRow__EXPERIMENTAL=ce,tn.$isTableCellNode=l,tn.$isTableNode=w,tn.$isTableRowNode=_,tn.$removeTableRowAtIndex=Oe,tn.$unmergeCell=dt,tn.INSERT_TABLE_COMMAND=Ct,tn.TableCellHeaderStates=r,tn.TableCellNode=o,tn.TableNode=B,tn.TableRowNode=u,tn.TableSelection=y,tn.applyTableHandlers=T,tn.getCellFromTarget=k,tn.getTableSelectionFromTableElement=R,tn}var nn={},P_;function S7(){if(P_)return nn;P_=1;var e=Xt(),t=vn();let n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(N){let I=new o(N.__headerState,N.__colSpan,N.__width,N.__key);return I.__rowSpan=N.__rowSpan,I.__backgroundColor=N.__backgroundColor,I}static importDOM(){return{td:()=>({conversion:i,priority:0}),th:()=>({conversion:i,priority:0})}}static importJSON(N){let I=N.rowSpan||1,q=a(N.headerState,N.colSpan||1,N.width||void 0);return q.__rowSpan=I,q.__backgroundColor=N.backgroundColor||null,q}constructor(N=r.NO_STATUS,I=1,q,ue){super(I,ue),this.__headerState=N,this.__width=q,this.__backgroundColor=null}createDOM(N){let I=document.createElement(this.getTag());return this.__width&&(I.style.width=`${this.__width}px`),1<this.__colSpan&&(I.colSpan=this.__colSpan),1<this.__rowSpan&&(I.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(I.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(I,N.theme.tableCell,this.hasHeader()&&N.theme.tableCellHeader),I}exportDOM(N){if({element:N}=super.exportDOM(N),N){var I=this.getParentOrThrow().getChildrenSize();N.style.border="1px solid black",1<this.__colSpan&&(N.colSpan=this.__colSpan),1<this.__rowSpan&&(N.rowSpan=this.__rowSpan),N.style.width=`${this.getWidth()||Math.max(90,700/I)}px`,N.style.verticalAlign="top",N.style.textAlign="start",I=this.getBackgroundColor(),I!==null?N.style.backgroundColor=I:this.hasHeader()&&(N.style.backgroundColor="#f2f3f5")}return{element:N}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(N){return this.getWritable().__headerState=N,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(N){return this.getWritable().__width=N,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(N){this.getWritable().__backgroundColor=N}toggleHeaderStyle(N){let I=this.getWritable();return I.__headerState=(I.__headerState&N)===N?I.__headerState-N:I.__headerState+N,I}hasHeaderState(N){return(this.getHeaderStyles()&N)===N}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(N){return N.__headerState!==this.__headerState||N.__width!==this.__width||N.__colSpan!==this.__colSpan||N.__rowSpan!==this.__rowSpan||N.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(w){var N=w.nodeName.toLowerCase();let I;return n.test(w.style.width)&&(I=parseFloat(w.style.width)),N=a(N==="th"?r.ROW:r.NO_STATUS,w.colSpan,I),N.__rowSpan=w.rowSpan,w=w.style.backgroundColor,w!==""&&(N.__backgroundColor=w),{forChild:(q,ue)=>l(ue)&&!e.$isElementNode(q)?(ue=e.$createParagraphNode(),e.$isLineBreakNode(q)&&q.getTextContent()===`
|
|
275
|
+
`?null:(ue.append(q),ue)):q,node:N}}function a(w,N=1,I){return e.$applyNodeReplacement(new o(w,N,I))}function l(w){return w instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(N){return new u(N.__height,N.__key)}static importDOM(){return{tr:()=>({conversion:p,priority:0})}}static importJSON(N){return g(N.height)}constructor(N,I){super(I),this.__height=N}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(N){let I=document.createElement("tr");return this.__height&&(I.style.height=`${this.__height}px`),t.addClassNamesToElement(I,N.theme.tableRow),I}isShadowRoot(){return!0}setHeight(N){return this.getWritable().__height=N,this.__height}getHeight(){return this.getLatest().__height}updateDOM(N){return N.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(w){let N;return n.test(w.style.height)&&(N=parseFloat(w.style.height)),{node:g(N)}}function g(w){return e.$applyNodeReplacement(new u(w))}function _(w){return w instanceof u}function C(w){let N=new URLSearchParams;N.append("code",w);for(let I=1;I<arguments.length;I++)N.append("v",arguments[I]);throw Error(`Minified Lexical error #${w}; visit https://lexical.dev/docs/error?${N} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let b=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";class y{constructor(N,I){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=I,this.editor=N,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(N=>N())}trackTableGrid(){let N=new MutationObserver(I=>{this.editor.update(()=>{var q=!1;for(let ue=0;ue<I.length;ue++){const he=I[ue].target.nodeName;if(he==="TABLE"||he==="TR"){q=!0;break}}if(q){if(q=this.editor.getElementByKey(this.tableNodeKey),!q)throw Error("Expected to find TableElement in DOM");this.grid=T(q)}})});this.editor.update(()=>{let I=this.editor.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");this.grid=T(I),N.observe(I,{childList:!0,subtree:!0})})}clearHighlight(){let N=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),N.update(()=>{var I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");if(I=N.getElementByKey(this.tableNodeKey),!I)throw Error("Expected to find TableElement in DOM");I=T(I),O(N,I,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(I,N._config.theme.tableSelection),I.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.addClassNamesToElement(I,N._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(N){if(N!=null&&N.gridKey===this.tableNodeKey){let I=this.editor;this.gridSelection=N,this.isHighlightingCells=!0,this.disableHighlightStyle(),O(I,this.grid,this.gridSelection)}else N==null?this.clearHighlight():(this.tableNodeKey=N.gridKey,this.updateTableGridSelection(N))}setFocusCellForSelection(N,I=!1){let q=this.editor;q.update(()=>{var ue=e.$getNodeByKey(this.tableNodeKey);if(!j(ue))throw Error("Expected TableNode.");if(!q.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");ue=N.x;let he=N.y;if(this.focusCell=N,this.anchorCell!==null){let se=b?(q._window||window).getSelection():null;se&&se.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ue||this.anchorY!==he||I))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ue===this.focusX&&he===this.focusY)return;this.focusX=ue,this.focusY=he,this.isHighlightingCells&&(ue=e.$getNearestNodeFromDOMNode(N.elem),this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(ue)&&(ue=ue.getKey(),this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ue,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),q.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),O(q,this.grid,this.gridSelection)))})}setAnchorCellForSelection(N){this.isHighlightingCells=!1,this.anchorCell=N,this.anchorX=N.x,this.anchorY=N.y,this.editor.update(()=>{var I=e.$getNearestNodeFromDOMNode(N.elem);l(I)&&(I=I.getKey(),this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=I)})}formatCells(N){this.editor.update(()=>{let I=e.$getSelection();e.DEPRECATED_$isGridSelection(I)||C(11);let q=e.$createRangeSelection(),ue=q.anchor,he=q.focus;I.getNodes().forEach(se=>{l(se)&&se.getTextContentSize()!==0&&(ue.set(se.getKey(),0,"element"),he.set(se.getKey(),se.getChildrenSize(),"element"),q.formatText(N))}),e.$setSelection(I),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){let N=this.editor;N.update(()=>{let I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");var q=e.$getSelection();e.DEPRECATED_$isGridSelection(q)||C(11),q=q.getNodes().filter(l),q.length===this.grid.columns*this.grid.rows?(I.selectPrevious(),I.remove(),e.$getRoot().selectStart()):(q.forEach(ue=>{if(e.$isElementNode(ue)){let he=e.$createParagraphNode(),se=e.$createTextNode();he.append(se),ue.append(he),ue.getChildren().forEach(Ce=>{Ce!==he&&Ce.remove()})}}),O(N,this.grid,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0))})}}function v(w){for(;w!=null;){let N=w.nodeName;if(N==="TD"||N==="TH"){if(w=w._cell,w===void 0)break;return w}w=w.parentNode}return null}function T(w){let N=[],I={cells:N,columns:0,rows:0};var q=w.firstChild;let ue=w=0;for(N.length=0;q!=null;){var he=q.nodeName;if(he==="TD"||he==="TH"){he=q,he={elem:he,hasBackgroundColor:he.style.backgroundColor!=="",highlighted:!1,x:w,y:ue},q._cell=he;let se=N[ue];se===void 0&&(se=N[ue]=[]),se[w]=he}else if(he=q.firstChild,he!=null){q=he;continue}if(he=q.nextSibling,he!=null)w++,q=he;else if(he=q.parentNode,he!=null){if(q=he.nextSibling,q==null)break;ue++,w=0}}return I.columns=w+1,I.rows=ue+1,I}function O(w,N,I){let q=new Set(I?I.getNodes():[]);R(N,(ue,he)=>{let se=ue.elem;q.has(he)?(ue.highlighted=!0,oe(w,ue)):(ue.highlighted=!1,Z(w,ue),se.getAttribute("style")||se.removeAttribute("style"))})}function R(w,N){({cells:w}=w);for(let I=0;I<w.length;I++){let q=w[I];if(q)for(let ue=0;ue<q.length;ue++){let he=q[ue];if(!he)continue;let se=e.$getNearestNodeFromDOMNode(he.elem);se!==null&&N(he,se,{x:ue,y:I})}}}function k(w,N){N.disableHighlightStyle(),R(N.grid,I=>{I.highlighted=!0,oe(w,I)})}function P(w,N){N.enableHighlightStyle(),R(N.grid,I=>{let q=I.elem;I.highlighted=!1,Z(w,I),q.getAttribute("style")||q.removeAttribute("style")})}let M=(w,N,I,q,ue)=>{const he=ue==="forward";switch(ue){case"backward":case"forward":return I!==(he?w.grid.columns-1:0)?(w=N.getCellNodeFromCordsOrThrow(I+(he?1:-1),q,w.grid),he?w.selectStart():w.selectEnd()):q!==(he?w.grid.rows-1:0)?(w=N.getCellNodeFromCordsOrThrow(he?0:w.grid.columns-1,q+(he?1:-1),w.grid),he?w.selectStart():w.selectEnd()):he?N.selectNext():N.selectPrevious(),!0;case"up":return q!==0?N.getCellNodeFromCordsOrThrow(I,q-1,w.grid).selectEnd():N.selectPrevious(),!0;case"down":return q!==w.grid.rows-1?N.getCellNodeFromCordsOrThrow(I,q+1,w.grid).selectStart():N.selectNext(),!0;default:return!1}},Y=(w,N,I,q,ue)=>{const he=ue==="forward";switch(ue){case"backward":case"forward":return I!==(he?w.grid.columns-1:0)&&w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I+(he?1:-1),q,w.grid)),!0;case"up":return q!==0?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q-1,w.grid)),!0):!1;case"down":return q!==w.grid.rows-1?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q+1,w.grid)),!0):!1;default:return!1}};function X(w,N){if(e.$isRangeSelection(w)||e.DEPRECATED_$isGridSelection(w)){let I=N.isParentOf(w.anchor.getNode());return w=N.isParentOf(w.focus.getNode()),I&&w}return!1}function oe(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null?w.style.setProperty("background-color","rgb(172,206,247)"):w.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),w.style.setProperty("caret-color","transparent")}function Z(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null&&w.style.removeProperty("background-color"),w.style.removeProperty("background-image"),w.style.removeProperty("caret-color")}function U(w){return w=t.$findMatchingParent(w,l),l(w)?w:null}function Q(w){return w=t.$findMatchingParent(w,j),j(w)?w:null}function de(w,N,I,q,ue){let he=e.$getSelection();if(!X(he,q))return!1;if(e.$isRangeSelection(he)&&he.isCollapsed()){if(I==="backward"||I==="forward")return!1;let{anchor:Be,focus:ce}=he;var se=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l);if(!l(se)||!se.is(Ce))return!1;if(Ce=Q(se),Ce!==q&&Ce!=null){var Oe=w.getElementByKey(Ce.getKey());if(Oe!=null)return ue.grid=T(Oe),de(w,N,I,Ce,ue)}if(Ce=w.getElementByKey(se.__key),Oe=w.getElementByKey(Be.key),Oe==null||Ce==null)return!1;if(Be.type==="element")Ce=Oe.getBoundingClientRect();else{if(Ce=window.getSelection(),Ce===null||Ce.rangeCount===0)return!1;Ce=Ce.getRangeAt(0).getBoundingClientRect()}if(Oe=I==="up"?se.getFirstChild():se.getLastChild(),Oe==null||(w=w.getElementByKey(Oe.__key),w==null))return!1;if(w=w.getBoundingClientRect(),I==="up"?w.top>Ce.top-Ce.height:Ce.bottom+Ce.height>w.bottom){if(pe(N),w=q.getCordsFromCellNode(se,ue.grid),N.shiftKey)I=q.getCellFromCordsOrThrow(w.x,w.y,ue.grid),ue.setAnchorCellForSelection(I),ue.setFocusCellForSelection(I,!0);else return M(ue,q,w.x,w.y,I);return!0}}else if(e.DEPRECATED_$isGridSelection(he)){let{anchor:Be,focus:ce}=he;return Oe=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l),[se]=he.getNodes(),w=w.getElementByKey(se.getKey()),!l(Oe)||!l(Ce)||!j(se)||w==null?!1:(ue.updateTableGridSelection(he),w=T(w),Oe=q.getCordsFromCellNode(Oe,w),Oe=q.getCellFromCordsOrThrow(Oe.x,Oe.y,w),ue.setAnchorCellForSelection(Oe),pe(N),N.shiftKey?(N=q.getCordsFromCellNode(Ce,w),Y(ue,se,N.x,N.y,I)):(Ce.selectEnd(),!0))}return!1}function pe(w){w.preventDefault(),w.stopImmediatePropagation(),w.stopPropagation()}class te extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(N){return new te(N.__key)}static importDOM(){return{table:()=>({conversion:fe,priority:1})}}static importJSON(){return V()}constructor(N){super(N)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(N){let I=document.createElement("table");return t.addClassNamesToElement(I,N.theme.table),I}updateDOM(){return!1}exportDOM(N){return{...super.exportDOM(N),after:I=>{if(I){let q=I.cloneNode(),ue=document.createElement("colgroup"),he=document.createElement("tbody");if(t.isHTMLElement(I)&&he.append(...I.children),I=this.getFirstChildOrThrow(),!_(I))throw Error("Expected to find row node.");I=I.getChildrenSize();for(let se=0;se<I;se++){let Ce=document.createElement("col");ue.append(Ce)}return q.replaceChildren(ue,he),q}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(N,I){let{rows:q,cells:ue}=I;for(I=0;I<q;I++){var he=ue[I];if(he!=null&&(he=he.findIndex(se=>{if(se)return{elem:se}=se,e.$getNearestNodeFromDOMNode(se)===N}),he!==-1))return{x:he,y:I}}throw Error("Cell not found in table.")}getCellFromCords(N,I,q){return{cells:q}=q,I=q[I],I==null?null:(N=I[N],N??null)}getCellFromCordsOrThrow(N,I,q){if(N=this.getCellFromCords(N,I,q),!N)throw Error("Cell not found at cords.");return N}getCellNodeFromCords(N,I,q){return N=this.getCellFromCords(N,I,q),N==null?null:(N=e.$getNearestNodeFromDOMNode(N.elem),l(N)?N:null)}getCellNodeFromCordsOrThrow(N,I,q){if(N=this.getCellNodeFromCords(N,I,q),!N)throw Error("Node at cords not TableCellNode.");return N}canSelectBefore(){return!0}canIndent(){return!1}}function fe(){return{node:V()}}function V(){return e.$applyNodeReplacement(new te)}function j(w){return w instanceof te}function ee(w){if(w=t.$findMatchingParent(w,N=>_(N)),_(w))return w;throw Error("Expected table cell to be inside of table row.")}function ne(w){if(w=t.$findMatchingParent(w,N=>j(N)),j(w))return w;throw Error("Expected table cell to be inside of table.")}function B(w,N){let I=ne(w),{x:q,y:ue}=I.getCordsFromCellNode(w,N);return{above:I.getCellNodeFromCords(q,ue-1,N),below:I.getCellNodeFromCords(q,ue+1,N),left:I.getCellNodeFromCords(q-1,ue,N),right:I.getCellNodeFromCords(q+1,ue,N)}}function W(w){let N=w.getFirstDescendant();N==null?w.selectStart():N.getParentOrThrow().selectStart()}function J(w,N){let I=w.getFirstChild();I!==null?I.insertBefore(N):w.append(N)}let F=e.createCommand("INSERT_TABLE_COMMAND");return nn.$createTableCellNode=a,nn.$createTableNode=V,nn.$createTableNodeWithDimensions=function(w,N,I=!0){let q=V();for(let he=0;he<w;he++){let se=g();for(let Ce=0;Ce<N;Ce++){var ue=r.NO_STATUS;typeof I=="object"?(he===0&&I.rows&&(ue|=r.ROW),Ce===0&&I.columns&&(ue|=r.COLUMN)):I&&(he===0&&(ue|=r.ROW),Ce===0&&(ue|=r.COLUMN)),ue=a(ue);let Oe=e.$createParagraphNode();Oe.append(e.$createTextNode()),ue.append(Oe),se.append(ue)}q.append(se)}return q},nn.$createTableRowNode=g,nn.$deleteTableColumn=function(w,N){let I=w.getChildren();for(let ue=0;ue<I.length;ue++){var q=I[ue];if(_(q)){if(q=q.getChildren(),N>=q.length||0>N)throw Error("Table column target index out of range");q[N].remove()}}return w},nn.$deleteTableColumn__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[N]=e.DEPRECATED_$getNodeTriplet(w);let[ue,he,se]=e.DEPRECATED_$computeGridMap(q,I,N);var{startColumn:Ce}=he;let{startRow:Oe,startColumn:Be}=se;w=Math.min(Ce,Be),Ce=Math.max(Ce+I.__colSpan-1,Be+N.__colSpan-1);let ce=Ce-w+1;if(ue[0].length===Ce-w+1)q.selectPrevious(),q.remove();else{var le=ue.length;for(let ve=0;ve<le;ve++)for(let Me=w;Me<=Ce;Me++){let{cell:Pe,startColumn:We}=ue[ve][Me];We<w?Me===w&&Pe.setColSpan(Pe.__colSpan-Math.min(ce,Pe.__colSpan-(w-We))):We+Pe.__colSpan-1>Ce?Me===Ce&&Pe.setColSpan(Pe.__colSpan-(Ce-We+1)):Pe.remove()}w=ue[Oe],N=w[Be+N.__colSpan],N!==void 0?({cell:N}=N,W(N)):({cell:N}=w[Be-1],W(N))}},nn.$deleteTableRow__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[w]=e.DEPRECATED_$getNodeTriplet(w);let[ue,he,se]=e.DEPRECATED_$computeGridMap(q,I,w);({startRow:N}=he);var{startRow:Ce}=se;if(w=Ce+w.__rowSpan-1,ue.length===w-N+1)q.remove();else{Ce=ue[0].length;var Oe=ue[w+1],Be=q.getChildAtIndex(w+1);for(let le=w;le>=N;le--){for(var ce=Ce-1;0<=ce;ce--){let{cell:ve,startRow:Me,startColumn:Pe}=ue[le][ce];if(Pe===ce&&(le===N&&Me<N&&ve.setRowSpan(ve.__rowSpan-(Me-N)),Me>=N&&Me+ve.__rowSpan-1>w))if(ve.setRowSpan(ve.__rowSpan-(w-Me+1)),Be===null&&C(122),ce===0)J(Be,ve);else{let{cell:We}=Oe[ce-1];We.insertAfter(ve)}}ce=q.getChildAtIndex(le),e.DEPRECATED_$isGridRowNode(ce)||C(123,String(le)),ce.remove()}Oe!==void 0?({cell:N}=Oe[0],W(N)):({cell:N}=ue[N-1][0],W(N))}},nn.$getElementGridForTableNode=function(w,N){if(w=w.getElementByKey(N.getKey()),w==null)throw Error("Table Element Not Found");return T(w)},nn.$getTableCellNodeFromLexicalNode=function(w){return w=t.$findMatchingParent(w,N=>l(N)),l(w)?w:null},nn.$getTableColumnIndexFromTableCellNode=function(w){return ee(w).getChildren().findIndex(N=>N.is(w))},nn.$getTableNodeFromLexicalNodeOrThrow=ne,nn.$getTableRowIndexFromTableCellNode=function(w){let N=ee(w);return ne(N).getChildren().findIndex(I=>I.is(N))},nn.$getTableRowNodeFromTableCellNodeOrThrow=ee,nn.$insertTableColumn=function(w,N,I=!0,q,ue){let he=w.getChildren(),se=[];for(let Be=0;Be<he.length;Be++){let ce=he[Be];if(_(ce))for(let le=0;le<q;le++){var Ce=ce.getChildren();if(N>=Ce.length||0>N)throw Error("Table column target index out of range");Ce=Ce[N],l(Ce)||C(12);let{left:ve,right:Me}=B(Ce,ue);var Oe=r.NO_STATUS;(ve&&ve.hasHeaderState(r.ROW)||Me&&Me.hasHeaderState(r.ROW))&&(Oe|=r.ROW),Oe=a(Oe),Oe.append(e.$createParagraphNode()),se.push({newTableCell:Oe,targetCell:Ce})}}return se.forEach(({newTableCell:Be,targetCell:ce})=>{I?ce.insertAfter(Be):ce.insertBefore(Be)}),w},nn.$insertTableColumn__EXPERIMENTAL=function(w=!0){function N(){let le=a(r.NO_STATUS).append(e.$createParagraphNode());return Be===null&&(Be=le),le}var I=e.$getSelection();if(!e.$INTERNAL_isPointSelection(I))throw Error("Expected a PointSeleciton");var q=I.anchor.getNode();I=I.focus.getNode(),[q]=e.DEPRECATED_$getNodeTriplet(q);let[ue,,he]=e.DEPRECATED_$getNodeTriplet(I),[se,Ce,Oe]=e.DEPRECATED_$computeGridMap(he,ue,q);q=se.length,I=w?Math.max(Ce.startColumn,Oe.startColumn):Math.min(Ce.startColumn,Oe.startColumn),w=w?I+ue.__colSpan-1:I-1,I=he.getFirstChild(),e.DEPRECATED_$isGridRowNode(I)||C(120);let Be=null;var ce=I;e:for(I=0;I<q;I++){I!==0&&(ce=ce.getNextSibling(),e.DEPRECATED_$isGridRowNode(ce)||C(121));let le=se[I];if(0>w){J(ce,N());continue}let{cell:ve,startColumn:Me,startRow:Pe}=le[w];if(Me+ve.__colSpan-1<=w){let We=ve,Xe=Pe,st=w;for(;Xe!==I&&1<We.__rowSpan;)if(st-=ve.__colSpan,0<=st){let{cell:dt,startRow:Ct}=le[st];We=dt,Xe=Ct}else{ce.append(N());continue e}We.insertAfter(N())}else ve.setColSpan(ve.__colSpan+1)}Be!==null&&W(Be)},nn.$insertTableRow=function(w,N,I=!0,q,ue){var he=w.getChildren();if(N>=he.length||0>N)throw Error("Table row target index out of range");if(N=he[N],_(N))for(he=0;he<q;he++){let Ce=N.getChildren(),Oe=Ce.length,Be=g();for(let ce=0;ce<Oe;ce++){var se=Ce[ce];l(se)||C(12);let{above:le,below:ve}=B(se,ue);se=r.NO_STATUS;let Me=le&&le.getWidth()||ve&&ve.getWidth()||void 0;(le&&le.hasHeaderState(r.COLUMN)||ve&&ve.hasHeaderState(r.COLUMN))&&(se|=r.COLUMN),se=a(se,1,Me),se.append(e.$createParagraphNode()),Be.append(se)}I?N.insertAfter(Be):N.insertBefore(Be)}else throw Error("Row before insertion index does not exist.");return w},nn.$insertTableRow__EXPERIMENTAL=function(w=!0){var N=e.$getSelection();if(!e.$INTERNAL_isPointSelection(N))throw Error("Expected a INTERNAL_PointSelection");N=N.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N),[ue,he]=e.DEPRECATED_$computeGridMap(q,I,I);N=ue[0].length;var{startRow:se}=he;if(w){w=se+I.__rowSpan-1;var Ce=ue[w];se=g();for(var Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce+Be.__rowSpan-1<=w?se.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(w),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertAfter(se)}else{for(Ce=ue[se],w=g(),Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce===se?w.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(se),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertBefore(w)}},nn.$isTableCellNode=l,nn.$isTableNode=j,nn.$isTableRowNode=_,nn.$removeTableRowAtIndex=function(w,N){let I=w.getChildren();if(N>=I.length||0>N)throw Error("Expected table cell to be inside of table row.");return I[N].remove(),w},nn.$unmergeCell=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");w=w.anchor.getNode();let[N,I,q]=e.DEPRECATED_$getNodeTriplet(w);w=N.__colSpan;let ue=N.__rowSpan;if(1<w){for(var he=1;he<w;he++)N.insertAfter(a(r.NO_STATUS));N.setColSpan(1)}if(1<ue){let[Oe,Be]=e.DEPRECATED_$computeGridMap(q,N,N),{startColumn:ce,startRow:le}=Be,ve;for(he=1;he<ue;he++){var se=le+he;let Me=Oe[se];ve=(ve||I).getNextSibling(),e.DEPRECATED_$isGridRowNode(ve)||C(125);var Ce=null;for(let Pe=0;Pe<ce;Pe++){let We=Me[Pe],Xe=We.cell;We.startRow===se&&(Ce=Xe),1<Xe.__colSpan&&(Pe+=Xe.__colSpan-1)}if(Ce===null)for(Ce=0;Ce<w;Ce++)J(ve,a(r.NO_STATUS));else for(se=0;se<w;se++)Ce.insertAfter(a(r.NO_STATUS))}N.setRowSpan(1)}},nn.INSERT_TABLE_COMMAND=F,nn.TableCellHeaderStates=r,nn.TableCellNode=o,nn.TableNode=te,nn.TableRowNode=u,nn.TableSelection=y,nn.applyTableHandlers=function(w,N,I,q){function ue(ce){return ce=w.getCordsFromCellNode(ce,se.grid),w.getCellFromCordsOrThrow(ce.x,ce.y,se.grid)}let he=I.getRootElement();if(he===null)throw Error("No root element.");let se=new y(I,w.getKey()),Ce=I._window||window;N.__lexicalTableSelection=se,N.addEventListener("mousedown",ce=>{setTimeout(()=>{if(ce.button===0&&Ce){var le=v(ce.target);le!==null&&(pe(ce),se.setAnchorCellForSelection(le));var ve=()=>{Ce.removeEventListener("mouseup",ve),Ce.removeEventListener("mousemove",Me)},Me=Pe=>{const We=v(Pe.target);We===null||se.anchorX===We.x&&se.anchorY===We.y||(Pe.preventDefault(),se.setFocusCellForSelection(We))};Ce.addEventListener("mouseup",ve),Ce.addEventListener("mousemove",Me)}},0)});let Oe=ce=>{ce.button===0&&I.update(()=>{const le=e.$getSelection(),ve=ce.target;e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&he.contains(ve)&&se.clearHighlight()})};Ce.addEventListener("mousedown",Oe),se.listenersToRemove.add(()=>Ce.removeEventListener("mousedown",Oe)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_DOWN_COMMAND,ce=>de(I,ce,"down",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_UP_COMMAND,ce=>de(I,ce,"up",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_LEFT_COMMAND,ce=>de(I,ce,"backward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,ce=>de(I,ce,"forward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ESCAPE_COMMAND,ce=>{var le=e.$getSelection();return e.DEPRECATED_$isGridSelection(le)&&(le=t.$findMatchingParent(le.focus.getNode(),l),l(le))?(pe(ce),le.selectEnd(),!0):!1},e.COMMAND_PRIORITY_HIGH));let Be=ce=>()=>{var le=e.$getSelection();if(!X(le,w))return!1;if(e.DEPRECATED_$isGridSelection(le))return se.clearText(),!0;if(e.$isRangeSelection(le)){const Pe=t.$findMatchingParent(le.anchor.getNode(),We=>l(We));if(!l(Pe))return!1;var ve=le.anchor.getNode(),Me=le.focus.getNode();if(ve=w.isParentOf(ve),Me=w.isParentOf(Me),ve&&!Me||Me&&!ve)return se.clearText(),!0;if(ve=(Me=t.$findMatchingParent(le.anchor.getNode(),We=>e.$isElementNode(We)))&&t.$findMatchingParent(Me,We=>e.$isElementNode(We)&&l(We.getParent())),!e.$isElementNode(ve)||!e.$isElementNode(Me))return!1;if(ce===e.DELETE_LINE_COMMAND&&ve.getPreviousSibling()===null)return!0;if((ce===e.DELETE_CHARACTER_COMMAND||ce===e.DELETE_WORD_COMMAND)&&le.isCollapsed()&&le.anchor.offset===0&&Me!==ve){le=Me.getChildren();const We=e.$createParagraphNode();return le.forEach(Xe=>We.append(Xe)),Me.replace(We),Me.getWritable().__parent=Pe.getKey(),!0}}return!1};return[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(ce=>{se.listenersToRemove.add(I.registerCommand(ce,Be(ce),e.COMMAND_PRIORITY_CRITICAL))}),N=ce=>{const le=e.$getSelection();return X(le,w)?e.DEPRECATED_$isGridSelection(le)?(ce.preventDefault(),ce.stopPropagation(),se.clearText(),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ve=>l(ve)),l(ce)),!1):!1},se.listenersToRemove.add(I.registerCommand(e.KEY_BACKSPACE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.KEY_DELETE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FORMAT_TEXT_COMMAND,ce=>{let le=e.$getSelection();return X(le,w)?e.DEPRECATED_$isGridSelection(le)?(se.formatCells(ce),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ve=>l(ve)),l(ce)),!1):!1},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,()=>{var ce=e.$getSelection();return X(ce,w)&&(e.DEPRECATED_$isGridSelection(ce)?se.clearHighlight():e.$isRangeSelection(ce)&&(ce=t.$findMatchingParent(ce.anchor.getNode(),le=>l(le)),l(ce))),!1},e.COMMAND_PRIORITY_CRITICAL)),q&&se.listenersToRemove.add(I.registerCommand(e.KEY_TAB_COMMAND,ce=>{var le=e.$getSelection();return!e.$isRangeSelection(le)||!le.isCollapsed()||!X(le,w)||(le=U(le.anchor.getNode()),le===null)?!1:(pe(ce),le=w.getCordsFromCellNode(le,se.grid),M(se,w,le.x,le.y,ce.shiftKey?"backward":"forward"),!0)},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FOCUS_COMMAND,()=>w.isSelected(),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{let ce=e.$getSelection(),le=e.$getPreviousSelection();if(e.$isRangeSelection(ce)){let{anchor:Xe,focus:st}=ce;var ve=Xe.getNode(),Me=st.getNode();ve=U(ve),Me=U(Me);var Pe=ve&&w.is(Q(ve)),We=Me&&w.is(Q(Me));let dt=Pe!==We;We=Pe&&We,Pe=ce.isBackward(),dt?(ve=ce.clone(),ve.focus.set(w.getKey(),Pe?0:w.getChildrenSize(),"element"),e.$setSelection(ve),k(I,se)):We&&!ve.is(Me)&&(se.setAnchorCellForSelection(ue(ve)),se.setFocusCellForSelection(ue(Me),!0))}return ce&&!ce.is(le)&&(e.DEPRECATED_$isGridSelection(ce)||e.DEPRECATED_$isGridSelection(le))&&se.gridSelection&&!se.gridSelection.is(le)?(e.DEPRECATED_$isGridSelection(ce)&&ce.gridKey===se.tableNodeKey?se.updateTableGridSelection(ce):!e.DEPRECATED_$isGridSelection(ce)&&e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&se.updateTableGridSelection(null),!1):(se.hasHijackedSelectionStyles&&!w.isSelected()?P(I,se):!se.hasHijackedSelectionStyles&&w.isSelected()&&k(I,se),!1)},e.COMMAND_PRIORITY_CRITICAL)),se},nn.getCellFromTarget=v,nn.getTableSelectionFromTableElement=function(w){return w.__lexicalTableSelection},nn}var I_,L_;function ay(){return L_||(L_=1,I_=process.env.NODE_ENV==="development"?N7():S7()),I_}var F_;function O7(){if(F_)return Tp;F_=1;var e=cr(),t=ay(),n=vn(),r=Xt(),o=H;function i({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){const[p]=e.useLexicalComposerContext();return o.useEffect(()=>{if(!p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode]))throw Error("TablePlugin: TableNode, TableCellNode or TableRowNode not registered on editor");return p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:g,rows:_,includeHeaders:C})=>{const b=t.$createTableNodeWithDimensions(Number(_),Number(g),C);n.$insertNodeToNearestRoot(b);const y=b.getFirstDescendant();return r.$isTextNode(y)&&y.select(),!0},r.COMMAND_PRIORITY_EDITOR)},[p]),o.useEffect(()=>{const g=new Map,_=b=>{const y=b.getKey(),v=p.getElementByKey(y);if(v&&!g.has(y)){const T=t.applyTableHandlers(b,v,p,u);g.set(y,T)}};p.getEditorState().read(()=>{const b=r.$nodesOfType(t.TableNode);for(const y of b)t.$isTableNode(y)&&_(y)});const C=p.registerMutationListener(t.TableNode,b=>{for(const[y,v]of b)if(v==="created")p.getEditorState().read(()=>{const T=r.$getNodeByKey(y);t.$isTableNode(T)&&_(T)});else if(v==="destroyed"){const T=g.get(y);T!==void 0&&(T.removeListeners(),g.delete(y))}});return()=>{C();for(const[,b]of g)b.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,g=>{if(g.getColSpan()>1||g.getRowSpan()>1){const[,,_]=r.DEPRECATED_$getNodeTriplet(g),[C]=r.DEPRECATED_$computeGridMap(_,g,g),b=C.length,y=C[0].length;let v=_.getFirstChild();if(!r.DEPRECATED_$isGridRowNode(v))throw Error("Expected TableNode first child to be a RowNode");const T=[];for(let O=0;O<b;O++){if(O!==0&&(v=v.getNextSibling(),!r.DEPRECATED_$isGridRowNode(v)))throw Error("Expected TableNode first child to be a RowNode");let R=null;for(let k=0;k<y;k++){const P=C[O][k],M=P.cell;if(P.startRow===O&&P.startColumn===k)R=M,T.push(M);else if(M.getColSpan()>1||M.getRowSpan()>1){const Y=t.$createTableCellNode(M.__headerState);R!==null?R.insertAfter(Y):n.$insertFirst(v,Y)}}}for(const O of T)O.setColSpan(1),O.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,g=>{g.getBackgroundColor()!==null&&g.setBackgroundColor(null)})},[p,l,a]),null}return Tp.TablePlugin=i,Tp}var Np={},j_;function A7(){if(j_)return Np;j_=1;var e=cr(),t=ay(),n=vn(),r=Xt(),o=H;function i(a){let l=new URLSearchParams;l.append("code",a);for(let u=1;u<arguments.length;u++)l.append("v",arguments[u]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}return Np.TablePlugin=function({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){let[p]=e.useLexicalComposerContext();return o.useEffect(()=>(p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode])||i(10),p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:g,rows:_,includeHeaders:C})=>(g=t.$createTableNodeWithDimensions(Number(_),Number(g),C),n.$insertNodeToNearestRoot(g),g=g.getFirstDescendant(),r.$isTextNode(g)&&g.select(),!0),r.COMMAND_PRIORITY_EDITOR)),[p]),o.useEffect(()=>{let g=new Map,_=b=>{const y=b.getKey(),v=p.getElementByKey(y);v&&!g.has(y)&&(b=t.applyTableHandlers(b,v,p,u),g.set(y,b))};p.getEditorState().read(()=>{let b=r.$nodesOfType(t.TableNode);for(let y of b)t.$isTableNode(y)&&_(y)});let C=p.registerMutationListener(t.TableNode,b=>{for(const[y,v]of b)v==="created"?p.getEditorState().read(()=>{const T=r.$getNodeByKey(y);t.$isTableNode(T)&&_(T)}):v==="destroyed"&&(b=g.get(y),b!==void 0&&(b.removeListeners(),g.delete(y)))});return()=>{C();for(let[,b]of g)b.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,g=>{if(1<g.getColSpan()||1<g.getRowSpan()){var[,,_]=r.DEPRECATED_$getNodeTriplet(g);[g]=r.DEPRECATED_$computeGridMap(_,g,g);let b=g.length,y=g[0].length;if(_=_.getFirstChild(),!r.DEPRECATED_$isGridRowNode(_))throw Error("Expected TableNode first child to be a RowNode");let v=[];for(let T=0;T<b;T++){if(T!==0&&(_=_.getNextSibling(),!r.DEPRECATED_$isGridRowNode(_)))throw Error("Expected TableNode first child to be a RowNode");let O=null;for(let R=0;R<y;R++){var C=g[T][R];let k=C.cell;C.startRow===T&&C.startColumn===R?(O=k,v.push(k)):(1<k.getColSpan()||1<k.getRowSpan())&&(C=t.$createTableCellNode(k.__headerState),O!==null?O.insertAfter(C):n.$insertFirst(_,C))}}for(let T of v)T.setColSpan(1),T.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,g=>{g.getBackgroundColor()!==null&&g.setBackgroundColor(null)})},[p,l,a]),null},Np}process.env.NODE_ENV==="development"?O7():A7();var Un={},B_={exports:{}},W_;function ON(){return W_||(W_=1,function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
276
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
277
|
+
*
|
|
278
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
279
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
280
|
+
* @namespace
|
|
281
|
+
* @public
|
|
282
|
+
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function R(k){return k instanceof u?new u(k.type,R(k.content),k.alias):Array.isArray(k)?k.map(R):k.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(R){return Object.prototype.toString.call(R).slice(8,-1)},objId:function(R){return R.__id||Object.defineProperty(R,"__id",{value:++i}),R.__id},clone:function R(k,P){P=P||{};var M,Y;switch(l.util.type(k)){case"Object":if(Y=l.util.objId(k),P[Y])return P[Y];M={},P[Y]=M;for(var X in k)k.hasOwnProperty(X)&&(M[X]=R(k[X],P));return M;case"Array":return Y=l.util.objId(k),P[Y]?P[Y]:(M=[],P[Y]=M,k.forEach(function(oe,Z){M[Z]=R(oe,P)}),M);default:return k}},getLanguage:function(R){for(;R;){var k=o.exec(R.className);if(k)return k[1].toLowerCase();R=R.parentElement}return"none"},setLanguage:function(R,k){R.className=R.className.replace(RegExp(o,"gi"),""),R.classList.add("language-"+k)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(M){var R=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(R){var k=document.getElementsByTagName("script");for(var P in k)if(k[P].src==R)return k[P]}return null}},isActive:function(R,k,P){for(var M="no-"+k;R;){var Y=R.classList;if(Y.contains(k))return!0;if(Y.contains(M))return!1;R=R.parentElement}return!!P}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(R,k){var P=l.util.clone(l.languages[R]);for(var M in k)P[M]=k[M];return P},insertBefore:function(R,k,P,M){M=M||l.languages;var Y=M[R],X={};for(var oe in Y)if(Y.hasOwnProperty(oe)){if(oe==k)for(var Z in P)P.hasOwnProperty(Z)&&(X[Z]=P[Z]);P.hasOwnProperty(oe)||(X[oe]=Y[oe])}var U=M[R];return M[R]=X,l.languages.DFS(l.languages,function(Q,de){de===U&&Q!=R&&(this[Q]=X)}),X},DFS:function R(k,P,M,Y){Y=Y||{};var X=l.util.objId;for(var oe in k)if(k.hasOwnProperty(oe)){P.call(k,oe,k[oe],M||oe);var Z=k[oe],U=l.util.type(Z);U==="Object"&&!Y[X(Z)]?(Y[X(Z)]=!0,R(Z,P,null,Y)):U==="Array"&&!Y[X(Z)]&&(Y[X(Z)]=!0,R(Z,P,oe,Y))}}},plugins:{},highlightAll:function(R,k){l.highlightAllUnder(document,R,k)},highlightAllUnder:function(R,k,P){var M={callback:P,container:R,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),l.hooks.run("before-all-elements-highlight",M);for(var Y=0,X;X=M.elements[Y++];)l.highlightElement(X,k===!0,M.callback)},highlightElement:function(R,k,P){var M=l.util.getLanguage(R),Y=l.languages[M];l.util.setLanguage(R,M);var X=R.parentElement;X&&X.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(X,M);var oe=R.textContent,Z={element:R,language:M,grammar:Y,code:oe};function U(de){Z.highlightedCode=de,l.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,l.hooks.run("after-highlight",Z),l.hooks.run("complete",Z),P&&P.call(Z.element)}if(l.hooks.run("before-sanity-check",Z),X=Z.element.parentElement,X&&X.nodeName.toLowerCase()==="pre"&&!X.hasAttribute("tabindex")&&X.setAttribute("tabindex","0"),!Z.code){l.hooks.run("complete",Z),P&&P.call(Z.element);return}if(l.hooks.run("before-highlight",Z),!Z.grammar){U(l.util.encode(Z.code));return}if(k&&r.Worker){var Q=new Worker(l.filename);Q.onmessage=function(de){U(de.data)},Q.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else U(l.highlight(Z.code,Z.grammar,Z.language))},highlight:function(R,k,P){var M={code:R,grammar:k,language:P};if(l.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=l.tokenize(M.code,M.grammar),l.hooks.run("after-tokenize",M),u.stringify(l.util.encode(M.tokens),M.language)},tokenize:function(R,k){var P=k.rest;if(P){for(var M in P)k[M]=P[M];delete k.rest}var Y=new _;return C(Y,Y.head,R),g(R,Y,k,Y.head,0),y(Y)},hooks:{all:{},add:function(R,k){var P=l.hooks.all;P[R]=P[R]||[],P[R].push(k)},run:function(R,k){var P=l.hooks.all[R];if(!(!P||!P.length))for(var M=0,Y;Y=P[M++];)Y(k)}},Token:u};r.Prism=l;function u(R,k,P,M){this.type=R,this.content=k,this.alias=P,this.length=(M||"").length|0}u.stringify=function R(k,P){if(typeof k=="string")return k;if(Array.isArray(k)){var M="";return k.forEach(function(U){M+=R(U,P)}),M}var Y={type:k.type,content:R(k.content,P),tag:"span",classes:["token",k.type],attributes:{},language:P},X=k.alias;X&&(Array.isArray(X)?Array.prototype.push.apply(Y.classes,X):Y.classes.push(X)),l.hooks.run("wrap",Y);var oe="";for(var Z in Y.attributes)oe+=" "+Z+'="'+(Y.attributes[Z]||"").replace(/"/g,""")+'"';return"<"+Y.tag+' class="'+Y.classes.join(" ")+'"'+oe+">"+Y.content+"</"+Y.tag+">"};function p(R,k,P,M){R.lastIndex=k;var Y=R.exec(P);if(Y&&M&&Y[1]){var X=Y[1].length;Y.index+=X,Y[0]=Y[0].slice(X)}return Y}function g(R,k,P,M,Y,X){for(var oe in P)if(!(!P.hasOwnProperty(oe)||!P[oe])){var Z=P[oe];Z=Array.isArray(Z)?Z:[Z];for(var U=0;U<Z.length;++U){if(X&&X.cause==oe+","+U)return;var Q=Z[U],de=Q.inside,pe=!!Q.lookbehind,te=!!Q.greedy,fe=Q.alias;if(te&&!Q.pattern.global){var V=Q.pattern.toString().match(/[imsuy]*$/)[0];Q.pattern=RegExp(Q.pattern.source,V+"g")}for(var j=Q.pattern||Q,ee=M.next,ne=Y;ee!==k.tail&&!(X&&ne>=X.reach);ne+=ee.value.length,ee=ee.next){var B=ee.value;if(k.length>R.length)return;if(!(B instanceof u)){var W=1,J;if(te){if(J=p(j,ne,R,pe),!J||J.index>=R.length)break;var I=J.index,F=J.index+J[0].length,w=ne;for(w+=ee.value.length;I>=w;)ee=ee.next,w+=ee.value.length;if(w-=ee.value.length,ne=w,ee.value instanceof u)continue;for(var N=ee;N!==k.tail&&(w<F||typeof N.value=="string");N=N.next)W++,w+=N.value.length;W--,B=R.slice(ne,w),J.index-=ne}else if(J=p(j,0,B,pe),!J)continue;var I=J.index,q=J[0],ue=B.slice(0,I),he=B.slice(I+q.length),se=ne+B.length;X&&se>X.reach&&(X.reach=se);var Ce=ee.prev;ue&&(Ce=C(k,Ce,ue),ne+=ue.length),b(k,Ce,W);var Oe=new u(oe,de?l.tokenize(q,de):q,fe,q);if(ee=C(k,Ce,Oe),he&&C(k,ee,he),W>1){var Be={cause:oe+","+U,reach:se};g(R,k,P,ee.prev,ne,Be),X&&Be.reach>X.reach&&(X.reach=Be.reach)}}}}}}function _(){var R={value:null,prev:null,next:null},k={value:null,prev:R,next:null};R.next=k,this.head=R,this.tail=k,this.length=0}function C(R,k,P){var M=k.next,Y={value:P,prev:k,next:M};return k.next=Y,M.prev=Y,R.length++,Y}function b(R,k,P){for(var M=k.next,Y=0;Y<P&&M!==R.tail;Y++)M=M.next;k.next=M,M.prev=k,R.length-=Y}function y(R){for(var k=[],P=R.head.next;P!==R.tail;)k.push(P.value),P=P.next;return k}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(R){var k=JSON.parse(R.data),P=k.language,M=k.code,Y=k.immediateClose;r.postMessage(l.highlight(M,l.languages[P],P)),Y&&r.close()},!1)),l;var v=l.util.currentScript();v&&(l.filename=v.src,v.hasAttribute("data-manual")&&(l.manual=!0));function T(){l.manual||l.highlightAll()}if(!l.manual){var O=document.readyState;O==="loading"||O==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",T):window.requestAnimationFrame?window.requestAnimationFrame(T):window.setTimeout(T,16)}return l}(t);e.exports&&(e.exports=n),typeof pb<"u"&&(pb.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var i={};i["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(v,T){return"✖ Error "+v+" while fetching file: "+T},i="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",u="loading",p="loaded",g="failed",_="pre[data-src]:not(["+l+'="'+p+'"]):not(['+l+'="'+u+'"])';function C(v,T,O){var R=new XMLHttpRequest;R.open("GET",v,!0),R.onreadystatechange=function(){R.readyState==4&&(R.status<400&&R.responseText?T(R.responseText):R.status>=400?O(o(R.status,R.statusText)):O(i))},R.send(null)}function b(v){var T=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(T){var O=Number(T[1]),R=T[2],k=T[3];return R?k?[O,Number(k)]:[O,void 0]:[O,O]}}n.hooks.add("before-highlightall",function(v){v.selector+=", "+_}),n.hooks.add("before-sanity-check",function(v){var T=v.element;if(T.matches(_)){v.code="",T.setAttribute(l,u);var O=T.appendChild(document.createElement("CODE"));O.textContent=r;var R=T.getAttribute("data-src"),k=v.language;if(k==="none"){var P=(/\.(\w+)$/.exec(R)||[,"none"])[1];k=a[P]||P}n.util.setLanguage(O,k),n.util.setLanguage(T,k);var M=n.plugins.autoloader;M&&M.loadLanguages(k),C(R,function(Y){T.setAttribute(l,p);var X=b(T.getAttribute("data-range"));if(X){var oe=Y.split(/\r\n?|\n/g),Z=X[0],U=X[1]==null?oe.length:X[1];Z<0&&(Z+=oe.length),Z=Math.max(0,Math.min(Z-1,oe.length)),U<0&&(U+=oe.length),U=Math.max(0,Math.min(U,oe.length)),Y=oe.slice(Z,U).join(`
|
|
283
|
+
`),T.hasAttribute("data-start")||T.setAttribute("data-start",String(Z+1))}O.textContent=Y,n.highlightElement(O)},function(Y){T.setAttribute(l,g),O.textContent=Y})}}),n.plugins.fileHighlight={highlight:function(v){for(var T=(v||document).querySelectorAll(_),O=0,R;R=T[O++];)n.highlightElement(R)}};var y=!1;n.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(B_)),B_.exports}var R7={},z_;function AN(){return z_||(z_=1,Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}),R7}var $7={},H_;function RN(){return H_||(H_=1,Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript),$7}var D7={},G_;function $N(){return G_||(G_=1,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml),D7}var k7={},K_;function DN(){return K_||(K_=1,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(g){return g=g.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+g+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(g){["url","bold","italic","strike","code-snippet"].forEach(function(_){g!==_&&(e.languages.markdown[g].inside.content.inside[_]=e.languages.markdown[_])})}),e.hooks.add("after-tokenize",function(g){if(g.language!=="markdown"&&g.language!=="md")return;function _(C){if(!(!C||typeof C=="string"))for(var b=0,y=C.length;b<y;b++){var v=C[b];if(v.type!=="code"){_(v.content);continue}var T=v.content[1],O=v.content[3];if(T&&O&&T.type==="code-language"&&O.type==="code-block"&&typeof T.content=="string"){var R=T.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");R=(/[a-z][\w-]*/i.exec(R)||[""])[0].toLowerCase();var k="language-"+R;O.alias?typeof O.alias=="string"?O.alias=[O.alias,k]:O.alias.push(k):O.alias=[k]}}}_(g.tokens)}),e.hooks.add("wrap",function(g){if(g.type==="code-block"){for(var _="",C=0,b=g.classes.length;C<b;C++){var y=g.classes[C],v=/language-(.+)/.exec(y);if(v){_=v[1];break}}var T=e.languages[_];if(T)g.content=e.highlight(p(g.content),T,_);else if(_&&_!=="none"&&e.plugins.autoloader){var O="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);g.attributes.id=O,e.plugins.autoloader.loadLanguages(_,function(){var R=document.getElementById(O);R&&(R.innerHTML=e.highlight(R.textContent,e.languages[_],_))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function p(g){var _=g.replace(a,"");return _=_.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(C,b){if(b=b.toLowerCase(),b[0]==="#"){var y;return b[1]==="x"?y=parseInt(b.slice(2),16):y=Number(b.slice(1)),u(y)}else{var v=l[b];return v||C}}),_}e.languages.md=e.languages.markdown}(Prism)),k7}var M7={},U_;function kN(){return U_||(U_=1,Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean),M7}var P7={},V_;function MN(){return V_||(V_=1,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)),P7}var I7={},Y_;function PN(){return Y_||(Y_=1,Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec),I7}var L7={},q_;function IN(){return q_||(q_=1,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}),L7}var F7={},Z_;function LN(){return Z_||(Z_=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),F7}var j7={},J_;function FN(){return J_||(J_=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),j7}var B7={},X_;function jN(){return X_||(X_=1,Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift})),B7}var W7={},Q_;function BN(){return Q_||(Q_=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),W7}var z7={},ex;function WN(){return ex||(ex=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),z7}var H7={},tx;function zN(){return tx||(tx=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),H7}var nx;function G7(){if(nx)return Un;nx=1;var e=ON();AN(),RN(),$N(),DN(),kN(),MN(),PN(),IN(),LN(),FN(),jN(),BN(),WN(),zN();var t=vn(),n=Xt();const r=ce=>ce!=null&&e.languages.hasOwnProperty(ce)?ce:void 0;function o(ce,le){for(const ve of ce.childNodes){if(t.isHTMLElement(ve)&&ve.tagName===le)return!0;o(ve,le)}return!1}const i="data-highlight-language";class a extends n.ElementNode{static getType(){return"code"}static clone(le){return new a(le.__language,le.__key)}constructor(le,ve){super(ve),this.__language=r(le)}createDOM(le){const ve=document.createElement("code");t.addClassNamesToElement(ve,le.theme.code),ve.setAttribute("spellcheck","false");const Me=this.getLanguage();return Me&&ve.setAttribute(i,Me),ve}updateDOM(le,ve,Me){const Pe=this.__language,We=le.__language;return Pe?Pe!==We&&ve.setAttribute(i,Pe):We&&ve.removeAttribute(i),!1}exportDOM(){const le=document.createElement("pre");le.setAttribute("spellcheck","false");const ve=this.getLanguage();return ve&&le.setAttribute(i,ve),{element:le}}static importDOM(){return{code:le=>le.textContent!=null&&(/\r?\n/.test(le.textContent)||o(le,"BR"))?{conversion:p,priority:1}:null,div:le=>({conversion:g,priority:1}),pre:le=>({conversion:p,priority:0}),table:le=>O(le)?{conversion:_,priority:3}:null,td:le=>{const ve=le,Me=ve.closest("table");return T(ve)?{conversion:b,priority:3}:Me&&O(Me)?{conversion:C,priority:3}:null},tr:le=>{const ve=le.closest("table");return ve&&O(ve)?{conversion:C,priority:3}:null}}}static importJSON(le){const ve=l(le.language);return ve.setFormat(le.format),ve.setIndent(le.indent),ve.setDirection(le.direction),ve}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(le,ve=!0){const Me=this.getChildren(),Pe=Me.length;if(Pe>=2&&Me[Pe-1].getTextContent()===`
|
|
284
|
+
`&&Me[Pe-2].getTextContent()===`
|
|
285
|
+
`&&le.isCollapsed()&&le.anchor.key===this.__key&&le.anchor.offset===Pe){Me[Pe-1].remove(),Me[Pe-2].remove();const dt=n.$createParagraphNode();return this.insertAfter(dt,ve),dt}const{anchor:We,focus:Xe}=le,st=(We.isBefore(Xe)?We:Xe).getNode();if(n.$isTextNode(st)){let dt=pe(st);const Ct=[];for(;;)if(n.$isTabNode(dt))Ct.push(n.$createTabNode()),dt=dt.getNextSibling();else if(de(dt)){let ze=0;const tt=dt.getTextContent(),ut=dt.getTextContentSize();for(;ze<ut&&tt[ze]===" ";ze++);if(ze!==0&&Ct.push(Q(" ".repeat(ze))),ze!==ut)break;dt=dt.getNextSibling()}else break;const Se=st.splitText(We.offset)[0],me=We.offset===0?0:1,_e=Se.getIndexWithinParent()+me,De=st.getParentOrThrow(),Fe=[n.$createLineBreakNode(),...Ct];De.splice(_e,0,Fe);const ke=Ct[Ct.length-1];ke?ke.select():We.offset===0?Se.selectPrevious():Se.getNextSibling().selectNext(0,0)}if(u(st)){const{offset:dt}=le.anchor;st.splice(dt,0,[n.$createLineBreakNode()]),st.select(dt+1,dt+1)}return null}canIndent(){return!1}collapseAtStart(){const le=n.$createParagraphNode();return this.getChildren().forEach(ve=>le.append(ve)),this.replace(le),!0}setLanguage(le){const ve=this.getWritable();ve.__language=r(le)}getLanguage(){return this.getLatest().__language}}function l(ce){return n.$applyNodeReplacement(new a(ce))}function u(ce){return ce instanceof a}function p(ce){let le;return t.isHTMLElement(ce)&&(le=ce.getAttribute(i)),{node:l(le)}}function g(ce){const le=ce,ve=y(le);return!ve&&!v(le)?{node:null}:{after:Me=>{const Pe=ce.parentNode;return Pe!=null&&ce!==Pe.lastChild&&Me.push(n.$createLineBreakNode()),Me},node:ve?l():null}}function _(){return{node:l()}}function C(){return{node:null}}function b(ce){const le=ce;return{after:ve=>(le.parentNode&&le.parentNode.nextSibling&&ve.push(n.$createLineBreakNode()),ve),node:null}}function y(ce){return ce.style.fontFamily.match("monospace")!==null}function v(ce){let le=ce.parentElement;for(;le!==null;){if(y(le))return!0;le=le.parentElement}return!1}function T(ce){return ce.classList.contains("js-file-line")}function O(ce){return ce.classList.contains("js-file-line-container")}const R="javascript",k={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},P={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function M(ce){return P[ce]||ce}function Y(ce){const le=M(ce);return k[le]||le}const X=()=>R,oe=()=>Object.keys(e.languages).filter(ce=>typeof e.languages[ce]!="function").sort();class Z extends n.TextNode{constructor(le,ve,Me){super(le,Me),this.__highlightType=ve}static getType(){return"code-highlight"}static clone(le){return new Z(le.__text,le.__highlightType||void 0,le.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(le){const ve=super.createDOM(le),Me=U(le.theme,this.__highlightType);return t.addClassNamesToElement(ve,Me),ve}updateDOM(le,ve,Me){const Pe=super.updateDOM(le,ve,Me),We=U(Me.theme,le.__highlightType),Xe=U(Me.theme,this.__highlightType);return We!==Xe&&(We&&t.removeClassNamesFromElement(ve,We),Xe&&t.addClassNamesToElement(ve,Xe)),Pe}static importJSON(le){const ve=Q(le.text,le.highlightType);return ve.setFormat(le.format),ve.setDetail(le.detail),ve.setMode(le.mode),ve.setStyle(le.style),ve}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(le){return this}isParentRequired(){return!0}createParentElementNode(){return l()}}function U(ce,le){return le&&ce&&ce.codeHighlight&&ce.codeHighlight[le]}function Q(ce,le){return n.$applyNodeReplacement(new Z(ce,le))}function de(ce){return ce instanceof Z}function pe(ce){let le=ce,ve=ce;for(;de(ve)||n.$isTabNode(ve);)le=ve,ve=ve.getPreviousSibling();return le}function te(ce){let le=ce,ve=ce;for(;de(ve)||n.$isTabNode(ve);)le=ve,ve=ve.getNextSibling();return le}const fe={defaultLanguage:R,tokenize(ce,le){return e.tokenize(ce,e.languages[le||""]||e.languages[this.defaultLanguage])}};function V(ce,le){let ve=null,Me=null,Pe=ce,We=le,Xe=ce.getTextContent();for(;;){if(We===0){if(Pe=Pe.getPreviousSibling(),Pe===null)break;if(!(de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(Pe)){ve={node:Pe,offset:1};break}We=Math.max(0,Pe.getTextContentSize()-1),Xe=Pe.getTextContent()}else We--;const dt=Xe[We];de(Pe)&&dt!==" "&&(Me={node:Pe,offset:We})}if(Me!==null)return Me;let st=null;if(le<ce.getTextContentSize())de(ce)&&(st=ce.getTextContent()[le]);else{const dt=ce.getNextSibling();de(dt)&&(st=dt.getTextContent()[0])}if(st!==null&&st!==" ")return ve;{const dt=j(ce,le);return dt!==null?dt:ve}}function j(ce,le){let ve=ce,Me=le,Pe=ce.getTextContent(),We=ce.getTextContentSize();for(;;){if(!de(ve)||Me===We){if(ve=ve.getNextSibling(),ve===null||n.$isLineBreakNode(ve))return null;de(ve)&&(Me=0,Pe=ve.getTextContent(),We=ve.getTextContentSize())}if(de(ve)){if(Pe[Me]!==" ")return{node:ve,offset:Me};Me++}}}function ee(ce){const le=te(ce);if(n.$isLineBreakNode(le))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return le}function ne(ce,le,ve){const Me=ce.getParent();u(Me)?J(Me,le,ve):de(ce)&&ce.replace(n.$createTextNode(ce.__text))}function B(ce,le){const ve=le.getElementByKey(ce.getKey());if(ve===null)return;const Me=ce.getChildren(),Pe=Me.length;if(Pe===ve.__cachedChildrenLength)return;ve.__cachedChildrenLength=Pe;let We="1",Xe=1;for(let st=0;st<Pe;st++)n.$isLineBreakNode(Me[st])&&(We+=`
|
|
286
|
+
`+ ++Xe);ve.setAttribute("data-gutter",We)}const W=new Set;function J(ce,le,ve){const Me=ce.getKey();W.has(Me)||(W.add(Me),ce.getLanguage()===void 0&&ce.setLanguage(ve.defaultLanguage),le.update(()=>{w(Me,()=>{const Pe=n.$getNodeByKey(Me);if(!u(Pe)||!Pe.isAttached())return!1;const We=Pe.getTextContent(),Xe=ve.tokenize(We,Pe.getLanguage()||ve.defaultLanguage),st=F(Xe),dt=N(Pe.getChildren(),st),{from:Ct,to:Se,nodesForReplacement:me}=dt;return Ct!==Se||me.length?(ce.splice(Ct,Se-Ct,me),!0):!1})},{onUpdate:()=>{W.delete(Me)},skipTransforms:!0}))}function F(ce,le){const ve=[];for(const Me of ce)if(typeof Me=="string"){const Pe=Me.split(/(\n|\t)/),We=Pe.length;for(let Xe=0;Xe<We;Xe++){const st=Pe[Xe];st===`
|
|
287
|
+
`||st===`\r
|
|
288
|
+
`?ve.push(n.$createLineBreakNode()):st===" "?ve.push(n.$createTabNode()):st.length>0&&ve.push(Q(st,le))}}else{const{content:Pe}=Me;typeof Pe=="string"?ve.push(...F([Pe],Me.type)):Array.isArray(Pe)&&ve.push(...F(Pe,Me.type))}return ve}function w(ce,le){const ve=n.$getNodeByKey(ce);if(!u(ve)||!ve.isAttached())return;const Me=n.$getSelection();if(!n.$isRangeSelection(Me)){le();return}const Pe=Me.anchor,We=Pe.offset,Xe=Pe.type==="element"&&n.$isLineBreakNode(ve.getChildAtIndex(Pe.offset-1));let st=0;if(!Xe){const dt=Pe.getNode();st=We+dt.getPreviousSiblings().reduce((Ct,Se)=>Ct+Se.getTextContentSize(),0)}if(le()){if(Xe){Pe.getNode().select(We,We);return}ve.getChildren().some(dt=>{const Ct=n.$isTextNode(dt);if(Ct||n.$isLineBreakNode(dt)){const Se=dt.getTextContentSize();if(Ct&&Se>=st)return dt.select(st,st),!0;st-=Se}return!1})}}function N(ce,le){let ve=0;for(;ve<ce.length&&I(ce[ve],le[ve]);)ve++;const Me=ce.length,Pe=le.length,We=Math.min(Me,Pe)-ve;let Xe=0;for(;Xe<We;)if(Xe++,!I(ce[Me-Xe],le[Pe-Xe])){Xe--;break}const st=ve,dt=Me-Xe,Ct=le.slice(ve,Pe-Xe);return{from:st,nodesForReplacement:Ct,to:dt}}function I(ce,le){return de(ce)&&de(le)&&ce.__text===le.__text&&ce.__highlightType===le.__highlightType||n.$isTabNode(ce)&&n.$isTabNode(le)||n.$isLineBreakNode(ce)&&n.$isLineBreakNode(le)}function q(ce){if(!n.$isRangeSelection(ce))return!1;const le=ce.anchor.getNode(),ve=ce.focus.getNode();if(le.is(ve)&&u(le))return!0;const Me=le.getParent();return u(Me)&&Me.is(ve.getParent())}function ue(ce){const le=ce.getNodes(),ve=[[]];if(le.length===1&&u(le[0]))return ve;let Me=ve[0];for(let Pe=0;Pe<le.length;Pe++){const We=le[Pe];if(!(de(We)||n.$isTabNode(We)||n.$isLineBreakNode(We)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(We)?Pe!==0&&Me.length>0&&(Me=[],ve.push(Me)):Me.push(We)}return ve}function he(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return null;const ve=ce?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND,Me=ce?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND;if(ue(le).length>1)return ve;const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(u(Pe))return ve;const We=pe(Pe),Xe=te(Pe),st=le.anchor,dt=le.focus;let Ct,Se;return dt.isBefore(st)?(Ct=dt,Se=st):(Ct=st,Se=dt),We!==null&&Xe!==null&&Ct.key===We.getKey()&&Ct.offset===0&&Se.key===Xe.getKey()&&Se.offset===Xe.getTextContentSize()?ve:Me}function se(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return!1;const ve=ue(le),Me=ve.length;if(ve.length>1){for(let Xe=0;Xe<Me;Xe++){const st=ve[Xe];if(st.length>0){let dt=st[0];Xe===0&&(dt=pe(dt)),dt!==null&&(ce===n.INDENT_CONTENT_COMMAND?dt.insertBefore(n.$createTabNode()):n.$isTabNode(dt)&&dt.remove())}}return!0}const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(u(Pe))return ce===n.INDENT_CONTENT_COMMAND&&le.insertNodes([n.$createTabNode()]),!0;const We=pe(Pe);if(We===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return ce===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(We)?We.insertAfter(n.$createTabNode()):We.insertBefore(n.$createTabNode()):n.$isTabNode(We)&&We.remove(),!0}function Ce(ce,le){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:Me,focus:Pe}=ve,We=Me.offset,Xe=Pe.offset,st=Me.getNode(),dt=Pe.getNode(),Ct=ce===n.KEY_ARROW_UP_COMMAND;if(!q(ve)||!(de(st)||n.$isTabNode(st))||!(de(dt)||n.$isTabNode(dt)))return!1;if(!le.altKey){if(ve.isCollapsed()){const tt=st.getParentOrThrow();if(Ct&&We===0&&st.getPreviousSibling()===null){if(tt.getPreviousSibling()===null)return tt.selectPrevious(),le.preventDefault(),!0}else if(!Ct&&We===st.getTextContentSize()&&st.getNextSibling()===null&&tt.getNextSibling()===null)return tt.selectNext(),le.preventDefault(),!0}return!1}let Se,me;if(st.isBefore(dt)?(Se=pe(st),me=te(dt)):(Se=pe(dt),me=te(st)),Se==null||me==null)return!1;const _e=Se.getNodesBetween(me);for(let tt=0;tt<_e.length;tt++){const ut=_e[tt];if(!de(ut)&&!n.$isTabNode(ut)&&!n.$isLineBreakNode(ut))return!1}le.preventDefault(),le.stopPropagation();const De=Ct?Se.getPreviousSibling():me.getNextSibling();if(!n.$isLineBreakNode(De))return!0;const Fe=Ct?De.getPreviousSibling():De.getNextSibling();if(Fe==null)return!0;let ze=(de(Fe)||n.$isTabNode(Fe)||n.$isLineBreakNode(Fe)?Ct?pe(Fe):te(Fe):null)??Fe;return De.remove(),_e.forEach(tt=>tt.remove()),ce===n.KEY_ARROW_UP_COMMAND?(_e.forEach(tt=>ze.insertBefore(tt)),ze.insertBefore(De)):(ze.insertAfter(De),ze=De,_e.forEach(tt=>{ze.insertAfter(tt),ze=tt})),ve.setTextNodeRange(st,We,dt,Xe),!0}function Oe(ce,le){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:Me,focus:Pe}=ve,We=Me.getNode(),Xe=Pe.getNode(),st=ce===n.MOVE_TO_START;if(!(de(We)||n.$isTabNode(We))||!(de(Xe)||n.$isTabNode(Xe)))return!1;if(st){const dt=V(Xe,Pe.offset);if(dt!==null){const{node:Ct,offset:Se}=dt;n.$isLineBreakNode(Ct)?Ct.selectNext(0,0):ve.setTextNodeRange(Ct,Se,Ct,Se)}else Xe.getParentOrThrow().selectStart()}else ee(Xe).select();return le.preventDefault(),le.stopPropagation(),!0}function Be(ce,le){if(!ce.hasNodes([a,Z]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return le==null&&(le=fe),t.mergeRegister(ce.registerMutationListener(a,ve=>{ce.update(()=>{for(const[Me,Pe]of ve)if(Pe!=="destroyed"){const We=n.$getNodeByKey(Me);We!==null&&B(We,ce)}})}),ce.registerNodeTransform(a,ve=>J(ve,ce,le)),ce.registerNodeTransform(n.TextNode,ve=>ne(ve,ce,le)),ce.registerNodeTransform(Z,ve=>ne(ve,ce,le)),ce.registerCommand(n.KEY_TAB_COMMAND,ve=>{const Me=he(ve.shiftKey);return Me===null?!1:(ve.preventDefault(),ce.dispatchCommand(Me,void 0),!0)},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INSERT_TAB_COMMAND,()=>{const ve=n.$getSelection();return q(ve)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INDENT_CONTENT_COMMAND,ve=>se(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.OUTDENT_CONTENT_COMMAND,ve=>se(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_UP_COMMAND,ve=>Ce(n.KEY_ARROW_UP_COMMAND,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_DOWN_COMMAND,ve=>Ce(n.KEY_ARROW_DOWN_COMMAND,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_END,ve=>Oe(n.MOVE_TO_END,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_START,ve=>Oe(n.MOVE_TO_START,ve),n.COMMAND_PRIORITY_LOW))}return Un.$createCodeHighlightNode=Q,Un.$createCodeNode=l,Un.$isCodeHighlightNode=de,Un.$isCodeNode=u,Un.CODE_LANGUAGE_FRIENDLY_NAME_MAP=k,Un.CODE_LANGUAGE_MAP=P,Un.CodeHighlightNode=Z,Un.CodeNode=a,Un.DEFAULT_CODE_LANGUAGE=R,Un.PrismTokenizer=fe,Un.getCodeLanguages=oe,Un.getDefaultCodeLanguage=X,Un.getEndOfCodeInLine=ee,Un.getFirstCodeNodeOfLine=pe,Un.getLanguageFriendlyName=Y,Un.getLastCodeNodeOfLine=te,Un.getStartOfCodeInLine=V,Un.normalizeCodeLang=M,Un.registerCodeHighlighting=Be,Un}var Vn={},rx;function K7(){if(rx)return Vn;rx=1;var e=ON();AN(),RN(),$N(),DN(),kN(),MN(),PN(),IN(),LN(),FN(),jN(),BN(),WN(),zN();var t=vn(),n=Xt();let r=F=>F!=null&&e.languages.hasOwnProperty(F)?F:void 0;function o(F,w){for(let N of F.childNodes){if(t.isHTMLElement(N)&&N.tagName===w)return!0;o(N,w)}return!1}class i extends n.ElementNode{static getType(){return"code"}static clone(w){return new i(w.__language,w.__key)}constructor(w,N){super(N),this.__language=r(w)}createDOM(w){let N=document.createElement("code");return t.addClassNamesToElement(N,w.theme.code),N.setAttribute("spellcheck","false"),(w=this.getLanguage())&&N.setAttribute("data-highlight-language",w),N}updateDOM(w,N){let I=this.__language;return w=w.__language,I?I!==w&&N.setAttribute("data-highlight-language",I):w&&N.removeAttribute("data-highlight-language"),!1}exportDOM(){let w=document.createElement("pre");w.setAttribute("spellcheck","false");let N=this.getLanguage();return N&&w.setAttribute("data-highlight-language",N),{element:w}}static importDOM(){return{code:w=>w.textContent!=null&&(/\r?\n/.test(w.textContent)||o(w,"BR"))?{conversion:u,priority:1}:null,div:()=>({conversion:p,priority:1}),pre:()=>({conversion:u,priority:0}),table:w=>y(w)?{conversion:g,priority:3}:null,td:w=>{let N=w.closest("table");return w.classList.contains("js-file-line")?{conversion:C,priority:3}:N&&y(N)?{conversion:_,priority:3}:null},tr:w=>(w=w.closest("table"))&&y(w)?{conversion:_,priority:3}:null}}static importJSON(w){let N=a(w.language);return N.setFormat(w.format),N.setIndent(w.indent),N.setDirection(w.direction),N}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(w,N=!0){var I=this.getChildren(),q=I.length;if(2<=q&&I[q-1].getTextContent()===`
|
|
289
|
+
`&&I[q-2].getTextContent()===`
|
|
290
|
+
`&&w.isCollapsed()&&w.anchor.key===this.__key&&w.anchor.offset===q)return I[q-1].remove(),I[q-2].remove(),w=n.$createParagraphNode(),this.insertAfter(w,N),w;let{anchor:ue,focus:he}=w;if(N=(ue.isBefore(he)?ue:he).getNode(),n.$isTextNode(N)){for(q=Y(N),I=[];;)if(n.$isTabNode(q))I.push(n.$createTabNode()),q=q.getNextSibling();else if(M(q)){for(var se=0,Ce=q.getTextContent(),Oe=q.getTextContentSize();se<Oe&&Ce[se]===" ";se++);if(se!==0&&I.push(P(" ".repeat(se))),se!==Oe)break;q=q.getNextSibling()}else break;q=N.splitText(ue.offset)[0],se=ue.offset===0?0:1,se=q.getIndexWithinParent()+se,Ce=N.getParentOrThrow(),Oe=[n.$createLineBreakNode(),...I],Ce.splice(se,0,Oe),(I=I[I.length-1])?I.select():ue.offset===0?q.selectPrevious():q.getNextSibling().selectNext(0,0)}return l(N)&&({offset:w}=w.anchor,N.splice(w,0,[n.$createLineBreakNode()]),N.select(w+1,w+1)),null}canIndent(){return!1}collapseAtStart(){let w=n.$createParagraphNode();return this.getChildren().forEach(N=>w.append(N)),this.replace(w),!0}setLanguage(w){this.getWritable().__language=r(w)}getLanguage(){return this.getLatest().__language}}function a(F){return n.$applyNodeReplacement(new i(F))}function l(F){return F instanceof i}function u(F){let w;return t.isHTMLElement(F)&&(w=F.getAttribute("data-highlight-language")),{node:a(w)}}function p(F){let w=F.style.fontFamily.match("monospace")!==null;return w||b(F)?{after:N=>{let I=F.parentNode;return I!=null&&F!==I.lastChild&&N.push(n.$createLineBreakNode()),N},node:w?a():null}:{node:null}}function g(){return{node:a()}}function _(){return{node:null}}function C(F){return{after:w=>(F.parentNode&&F.parentNode.nextSibling&&w.push(n.$createLineBreakNode()),w),node:null}}function b(F){for(F=F.parentElement;F!==null;){if(F.style.fontFamily.match("monospace")!==null)return!0;F=F.parentElement}return!1}function y(F){return F.classList.contains("js-file-line-container")}let v={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},T={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function O(F){return T[F]||F}class R extends n.TextNode{constructor(w,N,I){super(w,I),this.__highlightType=N}static getType(){return"code-highlight"}static clone(w){return new R(w.__text,w.__highlightType||void 0,w.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(w){let N=super.createDOM(w);return w=k(w.theme,this.__highlightType),t.addClassNamesToElement(N,w),N}updateDOM(w,N,I){let q=super.updateDOM(w,N,I);return w=k(I.theme,w.__highlightType),I=k(I.theme,this.__highlightType),w!==I&&(w&&t.removeClassNamesFromElement(N,w),I&&t.addClassNamesToElement(N,I)),q}static importJSON(w){let N=P(w.text,w.highlightType);return N.setFormat(w.format),N.setDetail(w.detail),N.setMode(w.mode),N.setStyle(w.style),N}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return a()}}function k(F,w){return w&&F&&F.codeHighlight&&F.codeHighlight[w]}function P(F,w){return n.$applyNodeReplacement(new R(F,w))}function M(F){return F instanceof R}function Y(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getPreviousSibling();return w}function X(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getNextSibling();return w}let oe={defaultLanguage:"javascript",tokenize(F,w){return e.tokenize(F,e.languages[w||""]||e.languages[this.defaultLanguage])}};function Z(F,w){let N=null;var I=null,q=F;let ue=w,he=F.getTextContent();for(;;){if(ue===0){if(q=q.getPreviousSibling(),q===null)break;if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(q)){N={node:q,offset:1};break}ue=Math.max(0,q.getTextContentSize()-1),he=q.getTextContent()}else ue--;let se=he[ue];M(q)&&se!==" "&&(I={node:q,offset:ue})}if(I!==null)return I;if(I=null,w<F.getTextContentSize()?M(F)&&(I=F.getTextContent()[w]):(q=F.getNextSibling(),M(q)&&(I=q.getTextContent()[0])),I!==null&&I!==" ")return N;e:for(I=F,q=F.getTextContent(),F=F.getTextContentSize();;){if(!M(I)||w===F){if(I=I.getNextSibling(),I===null||n.$isLineBreakNode(I)){F=null;break e}M(I)&&(w=0,q=I.getTextContent(),F=I.getTextContentSize())}if(M(I)){if(q[w]!==" "){F={node:I,offset:w};break e}w++}}return F!==null?F:N}function U(F){if(F=X(F),n.$isLineBreakNode(F))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return F}function Q(F,w,N){let I=F.getParent();l(I)?pe(I,w,N):M(F)&&F.replace(n.$createTextNode(F.__text))}let de=new Set;function pe(F,w,N){let I=F.getKey();de.has(I)||(de.add(I),F.getLanguage()===void 0&&F.setLanguage(N.defaultLanguage),w.update(()=>{fe(I,()=>{var q=n.$getNodeByKey(I);if(!l(q)||!q.isAttached())return!1;var ue=q.getTextContent();ue=N.tokenize(ue,q.getLanguage()||N.defaultLanguage),ue=te(ue);var he=q.getChildren();for(q=0;q<he.length&&V(he[q],ue[q]);)q++;var se=he.length;let Ce=ue.length,Oe=Math.min(se,Ce)-q,Be=0;for(;Be<Oe;)if(Be++,!V(he[se-Be],ue[Ce-Be])){Be--;break}he=q,se-=Be,ue=ue.slice(q,Ce-Be);let{from:ce,to:le,nodesForReplacement:ve}={from:he,nodesForReplacement:ue,to:se};return ce!==le||ve.length?(F.splice(ce,le-ce,ve),!0):!1})},{onUpdate:()=>{de.delete(I)},skipTransforms:!0}))}function te(F,w){let N=[];for(let I of F)if(typeof I=="string"){F=I.split(/(\n|\t)/);let q=F.length;for(let ue=0;ue<q;ue++){let he=F[ue];he===`
|
|
291
|
+
`||he===`\r
|
|
292
|
+
`?N.push(n.$createLineBreakNode()):he===" "?N.push(n.$createTabNode()):0<he.length&&N.push(P(he,w))}}else({content:F}=I),typeof F=="string"?N.push(...te([F],I.type)):Array.isArray(F)&&N.push(...te(F,I.type));return N}function fe(F,w){if(F=n.$getNodeByKey(F),l(F)&&F.isAttached()){var N=n.$getSelection();if(n.$isRangeSelection(N)){N=N.anchor;var I=N.offset,q=N.type==="element"&&n.$isLineBreakNode(F.getChildAtIndex(N.offset-1)),ue=0;if(!q){let he=N.getNode();ue=I+he.getPreviousSiblings().reduce((se,Ce)=>se+Ce.getTextContentSize(),0)}w()&&(q?N.getNode().select(I,I):F.getChildren().some(he=>{let se=n.$isTextNode(he);if(se||n.$isLineBreakNode(he)){let Ce=he.getTextContentSize();if(se&&Ce>=ue)return he.select(ue,ue),!0;ue-=Ce}return!1}))}else w()}}function V(F,w){return M(F)&&M(w)&&F.__text===w.__text&&F.__highlightType===w.__highlightType||n.$isTabNode(F)&&n.$isTabNode(w)||n.$isLineBreakNode(F)&&n.$isLineBreakNode(w)}function j(F){if(!n.$isRangeSelection(F))return!1;var w=F.anchor.getNode();return F=F.focus.getNode(),w.is(F)&&l(w)?!0:(w=w.getParent(),l(w)&&w.is(F.getParent()))}function ee(F){F=F.getNodes();let w=[[]];if(F.length===1&&l(F[0]))return w;let N=w[0];for(let I=0;I<F.length;I++){let q=F[I];if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(q)?I!==0&&0<N.length&&(N=[],w.push(N)):N.push(q)}return w}function ne(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return null;let N=F?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND;if(F=F?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,1<ee(w).length)return N;var I=w.getNodes()[0];if(!(l(I)||M(I)||n.$isTabNode(I)||n.$isLineBreakNode(I)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(l(I))return N;let q=Y(I);I=X(I);var ue=w.anchor;let he=w.focus;return he.isBefore(ue)?w=he:(w=ue,ue=he),q!==null&&I!==null&&w.key===q.getKey()&&w.offset===0&&ue.key===I.getKey()&&ue.offset===I.getTextContentSize()?N:F}function B(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return!1;var N=ee(w);let I=N.length;if(1<N.length){for(w=0;w<I;w++){var q=N[w];0<q.length&&(q=q[0],w===0&&(q=Y(q)),q!==null&&(F===n.INDENT_CONTENT_COMMAND?q.insertBefore(n.$createTabNode()):n.$isTabNode(q)&&q.remove()))}return!0}if(N=w.getNodes()[0],!(l(N)||M(N)||n.$isTabNode(N)||n.$isLineBreakNode(N)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(l(N))return F===n.INDENT_CONTENT_COMMAND&&w.insertNodes([n.$createTabNode()]),!0;if(N=Y(N),N===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return F===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(N)?N.insertAfter(n.$createTabNode()):N.insertBefore(n.$createTabNode()):n.$isTabNode(N)&&N.remove(),!0}function W(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N,ue=I.offset,he=q.offset,se=I.getNode(),Ce=q.getNode();var Oe=F===n.KEY_ARROW_UP_COMMAND;if(!j(N)||!M(se)&&!n.$isTabNode(se)||!M(Ce)&&!n.$isTabNode(Ce))return!1;if(!w.altKey){if(N.isCollapsed()){if(F=se.getParentOrThrow(),Oe&&ue===0&&se.getPreviousSibling()===null){if(F.getPreviousSibling()===null)return F.selectPrevious(),w.preventDefault(),!0}else if(!Oe&&ue===se.getTextContentSize()&&se.getNextSibling()===null&&F.getNextSibling()===null)return F.selectNext(),w.preventDefault(),!0}return!1}let Be;if(se.isBefore(Ce)){var ce=Y(se);Be=X(Ce)}else ce=Y(Ce),Be=X(se);if(ce==null||Be==null)return!1;let le=ce.getNodesBetween(Be);for(let Me=0;Me<le.length;Me++){let Pe=le[Me];if(!M(Pe)&&!n.$isTabNode(Pe)&&!n.$isLineBreakNode(Pe))return!1}if(w.preventDefault(),w.stopPropagation(),w=Oe?ce.getPreviousSibling():Be.getNextSibling(),!n.$isLineBreakNode(w)||(ce=Oe?w.getPreviousSibling():w.getNextSibling(),ce==null))return!0;Oe=M(ce)||n.$isTabNode(ce)||n.$isLineBreakNode(ce)?Oe?Y(ce):X(ce):null;let ve=Oe??ce;return w.remove(),le.forEach(Me=>Me.remove()),F===n.KEY_ARROW_UP_COMMAND?(le.forEach(Me=>ve.insertBefore(Me)),ve.insertBefore(w)):(ve.insertAfter(w),ve=w,le.forEach(Me=>{ve.insertAfter(Me),ve=Me})),N.setTextNodeRange(se,ue,Ce,he),!0}function J(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N;var ue=I.getNode();let he=q.getNode();if(F=F===n.MOVE_TO_START,!M(ue)&&!n.$isTabNode(ue)||!M(he)&&!n.$isTabNode(he))return!1;if(F)if(ue=Z(he,q.offset),ue!==null){let{node:se,offset:Ce}=ue;n.$isLineBreakNode(se)?se.selectNext(0,0):N.setTextNodeRange(se,Ce,se,Ce)}else he.getParentOrThrow().selectStart();else U(he).select();return w.preventDefault(),w.stopPropagation(),!0}return Vn.$createCodeHighlightNode=P,Vn.$createCodeNode=a,Vn.$isCodeHighlightNode=M,Vn.$isCodeNode=l,Vn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=v,Vn.CODE_LANGUAGE_MAP=T,Vn.CodeHighlightNode=R,Vn.CodeNode=i,Vn.DEFAULT_CODE_LANGUAGE="javascript",Vn.PrismTokenizer=oe,Vn.getCodeLanguages=()=>Object.keys(e.languages).filter(F=>typeof e.languages[F]!="function").sort(),Vn.getDefaultCodeLanguage=()=>"javascript",Vn.getEndOfCodeInLine=U,Vn.getFirstCodeNodeOfLine=Y,Vn.getLanguageFriendlyName=function(F){return F=O(F),v[F]||F},Vn.getLastCodeNodeOfLine=X,Vn.getStartOfCodeInLine=Z,Vn.normalizeCodeLang=O,Vn.registerCodeHighlighting=function(F,w){if(!F.hasNodes([i,R]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return w==null&&(w=oe),t.mergeRegister(F.registerMutationListener(i,N=>{F.update(()=>{for(let[ue,he]of N)if(he!=="destroyed"){var I=n.$getNodeByKey(ue);if(I!==null)e:{var q=I;if(I=F.getElementByKey(q.getKey()),I===null)break e;q=q.getChildren();let se=q.length;if(se===I.__cachedChildrenLength)break e;I.__cachedChildrenLength=se;let Ce="1",Oe=1;for(let Be=0;Be<se;Be++)n.$isLineBreakNode(q[Be])&&(Ce+=`
|
|
293
|
+
`+ ++Oe);I.setAttribute("data-gutter",Ce)}}})}),F.registerNodeTransform(i,N=>pe(N,F,w)),F.registerNodeTransform(n.TextNode,N=>Q(N,F,w)),F.registerNodeTransform(R,N=>Q(N,F,w)),F.registerCommand(n.KEY_TAB_COMMAND,N=>{let I=ne(N.shiftKey);return I===null?!1:(N.preventDefault(),F.dispatchCommand(I,void 0),!0)},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INSERT_TAB_COMMAND,()=>{let N=n.$getSelection();return j(N)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INDENT_CONTENT_COMMAND,()=>B(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.OUTDENT_CONTENT_COMMAND,()=>B(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_UP_COMMAND,N=>W(n.KEY_ARROW_UP_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_DOWN_COMMAND,N=>W(n.KEY_ARROW_DOWN_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_END,N=>J(n.MOVE_TO_END,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_START,N=>J(n.MOVE_TO_START,N),n.COMMAND_PRIORITY_LOW))},Vn}process.env.NODE_ENV==="development"?G7():K7();cr();vn();var sy=Xt();function U7({src:e,altText:t,width:n,height:r,maxWidth:o}){const i=H.useMemo(()=>({height:r,width:n,maxWidth:o}),[r,n,o]);return an.jsx("img",{src:e,alt:t,style:i})}function V7({altText:e,height:t,maxWidth:n=500,src:r,width:o,key:i}){return sy.$applyNodeReplacement(new ly(r,e,n,o,t,i))}class ly extends sy.DecoratorNode{constructor(t,n,r,o,i,a){super(a),io(this,"__src"),io(this,"__altText"),io(this,"__width"),io(this,"__height"),io(this,"__maxWidth"),this.__src=t,this.__altText=n,this.__maxWidth=r,this.__width=o||"inherit",this.__height=i||"inherit"}static getType(){return"image"}static clone(t){return new ly(t.__src,t.__altText,t.__maxWidth,t.__width,t.__height,t.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:this.__height==="inherit"?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:this.__width==="inherit"?0:this.__width}}static importJSON(t){return V7(t)}createDOM(t){const n=document.createElement("span"),r=t.theme.image;return r&&(n.className=r),n}updateDOM(){return!1}decorate(){return an.jsx(U7,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}sy.createCommand("INSERT_IMAGE_COMMAND");oy();ay();iy();ry();var pu={},ox;function Y7(){if(ox)return pu;ox=1;var e=vn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(a){return new n(a.__text,a.__key)}constructor(a,l){super(a,l)}createDOM(a){const l=super.createDOM(a);return e.addClassNamesToElement(l,a.theme.hashtag),l}static importJSON(a){const l=r(a.text);return l.setFormat(a.format),l.setDetail(a.detail),l.setMode(a.mode),l.setStyle(a.style),l}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(i=""){return t.$applyNodeReplacement(new n(i))}function o(i){return i instanceof n}return pu.$createHashtagNode=r,pu.$isHashtagNode=o,pu.HashtagNode=n,pu}var gu={},ix;function q7(){if(ix)return gu;ix=1;var e=vn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(i){return new n(i.__text,i.__key)}constructor(i,a){super(i,a)}createDOM(i){let a=super.createDOM(i);return e.addClassNamesToElement(a,i.theme.hashtag),a}static importJSON(i){let a=r(i.text);return a.setFormat(i.format),a.setDetail(i.detail),a.setMode(i.mode),a.setStyle(i.style),a}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(o=""){return t.$applyNodeReplacement(new n(o))}return gu.$createHashtagNode=r,gu.$isHashtagNode=function(o){return o instanceof n},gu.HashtagNode=n,gu}process.env.NODE_ENV==="development"?Y7():q7();var yl={},Sp={},ax;function Z7(){if(ax)return Sp;ax=1;var e=cr(),t=Xt(),n=H;function r(i,a){return i.getEditorState().read(()=>{const l=t.$getNodeByKey(a);return l===null?!1:l.isSelected()})}function o(i){const[a]=e.useLexicalComposerContext(),[l,u]=n.useState(()=>r(a,i));n.useEffect(()=>{let _=!0;const C=a.registerUpdateListener(()=>{_&&u(r(a,i))});return()=>{_=!1,C()}},[a,i]);const p=n.useCallback(_=>{a.update(()=>{let C=t.$getSelection();t.$isNodeSelection(C)||(C=t.$createNodeSelection(),t.$setSelection(C)),t.$isNodeSelection(C)&&(_?C.add(i):C.delete(i))})},[a,i]),g=n.useCallback(()=>{a.update(()=>{const _=t.$getSelection();t.$isNodeSelection(_)&&_.clear()})},[a]);return[l,p,g]}return Sp.useLexicalNodeSelection=o,Sp}var Op={},sx;function J7(){if(sx)return Op;sx=1;var e=cr(),t=Xt(),n=H;function r(o,i){return o.getEditorState().read(()=>{let a=t.$getNodeByKey(i);return a===null?!1:a.isSelected()})}return Op.useLexicalNodeSelection=function(o){let[i]=e.useLexicalComposerContext(),[a,l]=n.useState(()=>r(i,o));n.useEffect(()=>{let g=!0,_=i.registerUpdateListener(()=>{g&&l(r(i,o))});return()=>{g=!1,_()}},[i,o]);let u=n.useCallback(g=>{i.update(()=>{let _=t.$getSelection();t.$isNodeSelection(_)||(_=t.$createNodeSelection(),t.$setSelection(_)),t.$isNodeSelection(_)&&(g?_.add(o):_.delete(o))})},[i,o]),p=n.useCallback(()=>{i.update(()=>{const g=t.$getSelection();t.$isNodeSelection(g)&&g.clear()})},[i]);return[a,u,p]},Op}var lx,cx;function HN(){return cx||(cx=1,lx=process.env.NODE_ENV==="development"?Z7():J7()),lx}var ux;function X7(){if(ux)return yl;ux=1;var e=cr(),t=HN(),n=vn(),r=Xt(),o=H;const i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:_}){const[C]=e.useLexicalComposerContext(),[b,y,v]=t.useLexicalNodeSelection(_),T=o.useCallback(O=>{if(b&&r.$isNodeSelection(r.$getSelection())){O.preventDefault();const R=r.$getNodeByKey(_);g(R)&&R.remove()}return!1},[b,_]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{const R=C.getElementByKey(_);return O.target===R?(O.shiftKey||v(),y(!b),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[v,C,b,_,T,y]),o.useEffect(()=>{const O=C.getElementByKey(_);O!==null&&(O.className=b?"selected":"")},[C,b,_]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(C){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
294
|
+
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function g(_){return _ instanceof l}return yl.$createHorizontalRuleNode=p,yl.$isHorizontalRuleNode=g,yl.HorizontalRuleNode=l,yl.INSERT_HORIZONTAL_RULE_COMMAND=i,yl}var vl={},dx;function Q7(){if(dx)return vl;dx=1;var e=cr(),t=HN(),n=vn(),r=Xt(),o=H;let i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:_}){let[C]=e.useLexicalComposerContext(),[b,y,v]=t.useLexicalNodeSelection(_),T=o.useCallback(O=>(b&&r.$isNodeSelection(r.$getSelection())&&(O.preventDefault(),O=r.$getNodeByKey(_),g(O)&&O.remove()),!1),[b,_]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{let R=C.getElementByKey(_);return O.target===R?(O.shiftKey||v(),y(!b),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[v,C,b,_,T,y]),o.useEffect(()=>{let O=C.getElementByKey(_);O!==null&&(O.className=b?"selected":"")},[C,b,_]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
295
|
+
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function g(_){return _ instanceof l}return vl.$createHorizontalRuleNode=p,vl.$isHorizontalRuleNode=g,vl.HorizontalRuleNode=l,vl.INSERT_HORIZONTAL_RULE_COMMAND=i,vl}process.env.NODE_ENV==="development"?X7():Q7();var fx=Object.prototype.hasOwnProperty;function hx(e,t,n){for(n of e.keys())if(wu(n,t))return n}function wu(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&wu(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=hx(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=hx(t,o),!o)||!wu(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(fx.call(e,n)&&++r&&!fx.call(t,n)||!(n in t)||!wu(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}let vg,GN,KN,UN,VN=!0;typeof process<"u"&&({FORCE_COLOR:vg,NODE_DISABLE_COLORS:GN,NO_COLOR:KN,TERM:UN}=process.env||{},VN=process.stdout&&process.stdout.isTTY);const Qt={enabled:!GN&&KN==null&&UN!=="dumb"&&(vg!=null&&vg!=="0"||VN),reset:En(0,0),bold:En(1,22),dim:En(2,22),italic:En(3,23),underline:En(4,24),inverse:En(7,27),hidden:En(8,28),strikethrough:En(9,29),black:En(30,39),red:En(31,39),green:En(32,39),yellow:En(33,39),blue:En(34,39),magenta:En(35,39),cyan:En(36,39),white:En(37,39),gray:En(90,39),grey:En(90,39),bgBlack:En(40,49),bgRed:En(41,49),bgGreen:En(42,49),bgYellow:En(43,49),bgBlue:En(44,49),bgMagenta:En(45,49),bgCyan:En(46,49),bgWhite:En(47,49)};function px(e,t){let n=0,r,o="",i="";for(;n<e.length;n++)r=e[n],o+=r.open,i+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return o+t+i}function eY(e,t){let n={has:e,keys:t};return n.reset=Qt.reset.bind(n),n.bold=Qt.bold.bind(n),n.dim=Qt.dim.bind(n),n.italic=Qt.italic.bind(n),n.underline=Qt.underline.bind(n),n.inverse=Qt.inverse.bind(n),n.hidden=Qt.hidden.bind(n),n.strikethrough=Qt.strikethrough.bind(n),n.black=Qt.black.bind(n),n.red=Qt.red.bind(n),n.green=Qt.green.bind(n),n.yellow=Qt.yellow.bind(n),n.blue=Qt.blue.bind(n),n.magenta=Qt.magenta.bind(n),n.cyan=Qt.cyan.bind(n),n.white=Qt.white.bind(n),n.gray=Qt.gray.bind(n),n.grey=Qt.grey.bind(n),n.bgBlack=Qt.bgBlack.bind(n),n.bgRed=Qt.bgRed.bind(n),n.bgGreen=Qt.bgGreen.bind(n),n.bgYellow=Qt.bgYellow.bind(n),n.bgBlue=Qt.bgBlue.bind(n),n.bgMagenta=Qt.bgMagenta.bind(n),n.bgCyan=Qt.bgCyan.bind(n),n.bgWhite=Qt.bgWhite.bind(n),n}function En(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:Qt.enabled?px(this.keys,r+""):r+""):r===void 0?eY([e],[n]):Qt.enabled?px([n],r+""):r+""}}function Ha(){}Ha.prototype={diff:function(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function a(k){return o?(setTimeout(function(){o(void 0,k)},0),!0):k}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var l=t.length,u=e.length,p=1,g=l+u;r.maxEditLength&&(g=Math.min(g,r.maxEditLength));var _=(n=r.timeout)!==null&&n!==void 0?n:1/0,C=Date.now()+_,b=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(b[0],t,e,0);if(b[0].oldPos+1>=u&&y+1>=l)return a([{value:this.join(t),count:t.length}]);var v=-1/0,T=1/0;function O(){for(var k=Math.max(v,-p);k<=Math.min(T,p);k+=2){var P=void 0,M=b[k-1],Y=b[k+1];M&&(b[k-1]=void 0);var X=!1;if(Y){var oe=Y.oldPos-k;X=Y&&0<=oe&&oe<l}var Z=M&&M.oldPos+1<u;if(!X&&!Z){b[k]=void 0;continue}if(!Z||X&&M.oldPos+1<Y.oldPos?P=i.addToPath(Y,!0,void 0,0):P=i.addToPath(M,void 0,!0,1),y=i.extractCommon(P,t,e,k),P.oldPos+1>=u&&y+1>=l)return a(tY(i,P.lastComponent,t,e,i.useLongestToken));b[k]=P,P.oldPos+1>=u&&(T=Math.min(T,k-1)),y+1>=l&&(v=Math.max(v,k+1))}p++}if(o)(function k(){setTimeout(function(){if(p>g||Date.now()>C)return o();O()||k()},0)})();else for(;p<=g&&Date.now()<=C;){var R=O();if(R)return R}},addToPath:function(e,t,n,r){var o=e.lastComponent;return o&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,a=e.oldPos,l=a-r,u=0;l+1<o&&a+1<i&&this.equals(t[l+1],n[a+1]);)l++,a++,u++;return u&&(e.lastComponent={count:u,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function tY(e,t,n,r,o){for(var i=[],a;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();for(var l=0,u=i.length,p=0,g=0;l<u;l++){var _=i[l];if(_.removed){if(_.value=e.join(r.slice(g,g+_.count)),g+=_.count,l&&i[l-1].added){var C=i[l-1];i[l-1]=i[l],i[l]=C}}else{if(!_.added&&o){var b=n.slice(p,p+_.count);b=b.map(function(v,T){var O=r[g+T];return O.length>v.length?O:v}),_.value=e.join(b)}else _.value=e.join(n.slice(p,p+_.count));p+=_.count,_.added||(g+=_.count)}}var y=i[u-1];return u>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(i[u-2].value+=y.value,i.pop()),i}var gx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,mx=/\S/,YN=new Ha;YN.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!mx.test(e)&&!mx.test(t)};YN.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&gx.test(t[n])&&gx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var qN=new Ha;qN.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
296
|
+
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var nY=new Ha;nY.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var rY=new Ha;rY.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Qd(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qd=function(t){return typeof t}:Qd=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(e)}var oY=Object.prototype.toString,Du=new Ha;Du.useLongestToken=!0;Du.tokenize=qN.tokenize;Du.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(bg(e,null,null,o),o," ")};Du.equals=function(e,t){return Ha.prototype.equals.call(Du,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function bg(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var a;if(oY.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),i=0;i<e.length;i+=1)a[i]=bg(e[i],t,n,r,o);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),Qd(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],u;for(u in e)e.hasOwnProperty(u)&&l.push(u);for(l.sort(),i=0;i<l.length;i+=1)u=l[i],a[u]=bg(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}var _g=new Ha;_g.tokenize=function(e){return e.slice()};_g.join=_g.removeEmpty=function(e){return e};Qt.red,Qt.grey,Qt.green;Qt.dim().italic;Qt.dim("→");Qt.dim("·");Qt.dim("↵");function xf(e){e=e.replace(/\r?\n/g,`
|
|
297
|
+
`);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,o=(t||[]).length;for(;n<o;n++)r=Math.min(r,t[n].length);return o&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class iY extends Error{constructor(t={}){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Go(e,t,n,r,o,i,a){if(e)return;let l=a||i;if(a instanceof Error)throw a;let u=o;throw new iY({actual:t,expects:n,operator:r,message:l,details:u,generated:!a})}function Ji(e,t){Go(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}Ji.ok=Ji;Ji.equal=function(e,t,n){Go(!wu(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};Ji.type=function(e,t,n){let r=typeof e;Go(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};Ji.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Go(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};Ji.snapshot=function(e,t,n){e=xf(e),t=xf(t),Go(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};Ji.fixture=function(e,t,n){e=xf(e),t=xf(t),Go(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};Ji.match=function(e,t,n){typeof t=="string"?Go(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Go(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};Ji.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Go(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Go(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Go(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};class Ms extends Error{}class aY extends Ms{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class sY extends Ms{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class lY extends Ms{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Fl extends Ms{}class ZN extends Ms{constructor(t){super(`Invalid unit ${t}`)}}class Gr extends Ms{}class Sa extends Ms{constructor(){super("Zone is an abstract class")}}const gt="numeric",Vo="short",so="long",Ef={year:gt,month:gt,day:gt},JN={year:gt,month:Vo,day:gt},cY={year:gt,month:Vo,day:gt,weekday:Vo},XN={year:gt,month:so,day:gt},QN={year:gt,month:so,day:gt,weekday:so},eS={hour:gt,minute:gt},tS={hour:gt,minute:gt,second:gt},nS={hour:gt,minute:gt,second:gt,timeZoneName:Vo},rS={hour:gt,minute:gt,second:gt,timeZoneName:so},oS={hour:gt,minute:gt,hourCycle:"h23"},iS={hour:gt,minute:gt,second:gt,hourCycle:"h23"},aS={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:Vo},sS={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:so},lS={year:gt,month:gt,day:gt,hour:gt,minute:gt},cS={year:gt,month:gt,day:gt,hour:gt,minute:gt,second:gt},uS={year:gt,month:Vo,day:gt,hour:gt,minute:gt},dS={year:gt,month:Vo,day:gt,hour:gt,minute:gt,second:gt},uY={year:gt,month:Vo,day:gt,weekday:Vo,hour:gt,minute:gt},fS={year:gt,month:so,day:gt,hour:gt,minute:gt,timeZoneName:Vo},hS={year:gt,month:so,day:gt,hour:gt,minute:gt,second:gt,timeZoneName:Vo},pS={year:gt,month:so,day:gt,weekday:so,hour:gt,minute:gt,timeZoneName:so},gS={year:gt,month:so,day:gt,weekday:so,hour:gt,minute:gt,second:gt,timeZoneName:so};class Uu{get type(){throw new Sa}get name(){throw new Sa}get ianaName(){return this.name}get isUniversal(){throw new Sa}offsetName(t,n){throw new Sa}formatOffset(t,n){throw new Sa}offset(t){throw new Sa}equals(t){throw new Sa}get isValid(){throw new Sa}}let Ap=null;class nh extends Uu{static get instance(){return Ap===null&&(Ap=new nh),Ap}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return wS(t,n,r)}formatOffset(t,n){return Tu(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let ef={};function dY(e){return ef[e]||(ef[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),ef[e]}const fY={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hY(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,l,u,p,g]=r;return[a,o,i,l,u,p,g]}function pY(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],l=fY[i];i==="era"?r[l]=a:Gt(l)||(r[l]=parseInt(a,10))}return r}let zd={};class Xi extends Uu{static create(t){return zd[t]||(zd[t]=new Xi(t)),zd[t]}static resetCache(){zd={},ef={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Xi.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return wS(t,n,r,this.name)}formatOffset(t,n){return Tu(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=dY(this.name);let[o,i,a,l,u,p,g]=r.formatToParts?pY(r,n):hY(r,n);l==="BC"&&(o=-Math.abs(o)+1);const _=oh({year:o,month:i,day:a,hour:u===24?0:u,minute:p,second:g,millisecond:0});let C=+n;const b=C%1e3;return C-=b>=0?b:1e3+b,(_-C)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let yx={};function gY(e,t={}){const n=JSON.stringify([e,t]);let r=yx[n];return r||(r=new Intl.ListFormat(e,t),yx[n]=r),r}let xg={};function Eg(e,t={}){const n=JSON.stringify([e,t]);let r=xg[n];return r||(r=new Intl.DateTimeFormat(e,t),xg[n]=r),r}let Cg={};function mY(e,t={}){const n=JSON.stringify([e,t]);let r=Cg[n];return r||(r=new Intl.NumberFormat(e,t),Cg[n]=r),r}let wg={};function yY(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=wg[o];return i||(i=new Intl.RelativeTimeFormat(e,t),wg[o]=i),i}let tf=null;function vY(){return tf||(tf=new Intl.DateTimeFormat().resolvedOptions().locale,tf)}let vx={};function bY(e){let t=vx[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,vx[e]=t}return t}function _Y(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=Eg(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=Eg(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function xY(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function EY(e){const t=[];for(let n=1;n<=12;n++){const r=It.utc(2009,n,1);t.push(e(r))}return t}function CY(e){const t=[];for(let n=1;n<=7;n++){const r=It.utc(2016,11,13+n);t.push(e(r))}return t}function Hd(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function wY(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class TY{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=mY(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):fy(t,3);return Xn(n,this.padTo)}}}class NY{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&Xi.create(l).valid?(o=l,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Eg(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class SY{constructor(t,n,r){this.opts={style:"long",...r},!n&&ES()&&(this.rtf=yY(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):VY(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const OY={firstDay:1,minimalDays:4,weekend:[6,7]};class mn{static fromOpts(t){return mn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||Yn.defaultLocale,l=a||(i?"en-US":vY()),u=n||Yn.defaultNumberingSystem,p=r||Yn.defaultOutputCalendar,g=Tg(o)||Yn.defaultWeekSettings;return new mn(l,u,p,g,a)}static resetCache(){tf=null,xg={},Cg={},wg={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return mn.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,l,u]=_Y(t);this.locale=a,this.numberingSystem=n||l||null,this.outputCalendar=r||u||null,this.weekSettings=o,this.intl=xY(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=wY(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:mn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Tg(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Hd(this,t,SS,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=EY(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return Hd(this,t,RS,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=CY(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return Hd(this,void 0,()=>$S,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[It.utc(2016,11,13,9),It.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Hd(this,t,DS,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[It.utc(-40,1,1),It.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(l=>l.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new TY(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new NY(t,this.intl,n)}relFormatter(t={}){return new SY(this.intl,this.isEnglish(),t)}listFormatter(t={}){return gY(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:CS()?bY(this.locale):OY}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let Rp=null;class Fr extends Uu{static get utcInstance(){return Rp===null&&(Rp=new Fr(0)),Rp}static instance(t){return t===0?Fr.utcInstance:new Fr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Fr(ih(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Tu(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Tu(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Tu(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class AY extends Uu{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Da(e,t){if(Gt(e)||e===null)return t;if(e instanceof Uu)return e;if(DY(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?nh.instance:n==="utc"||n==="gmt"?Fr.utcInstance:Fr.parseSpecifier(n)||Xi.create(e)}else return _s(e)?Fr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new AY(e)}let bx=()=>Date.now(),_x="system",xx=null,Ex=null,Cx=null,wx=60,Tx,Nx=null;class Yn{static get now(){return bx}static set now(t){bx=t}static set defaultZone(t){_x=t}static get defaultZone(){return Da(_x,nh.instance)}static get defaultLocale(){return xx}static set defaultLocale(t){xx=t}static get defaultNumberingSystem(){return Ex}static set defaultNumberingSystem(t){Ex=t}static get defaultOutputCalendar(){return Cx}static set defaultOutputCalendar(t){Cx=t}static get defaultWeekSettings(){return Nx}static set defaultWeekSettings(t){Nx=Tg(t)}static get twoDigitCutoffYear(){return wx}static set twoDigitCutoffYear(t){wx=t%100}static get throwOnInvalid(){return Tx}static set throwOnInvalid(t){Tx=t}static resetCaches(){mn.resetCache(),Xi.resetCache()}}class Ho{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const mS=[0,31,59,90,120,151,181,212,243,273,304,334],yS=[0,31,60,91,121,152,182,213,244,274,305,335];function xo(e,t){return new Ho("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function cy(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function vS(e,t,n){return n+(Vu(e)?yS:mS)[t-1]}function bS(e,t){const n=Vu(e)?yS:mS,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function uy(e,t){return(e-t+7)%7+1}function Cf(e,t=4,n=1){const{year:r,month:o,day:i}=e,a=vS(r,o,i),l=uy(cy(r,o,i),n);let u=Math.floor((a-l+14-t)/7),p;return u<1?(p=r-1,u=ku(p,t,n)):u>ku(r,t,n)?(p=r+1,u=1):p=r,{weekYear:p,weekNumber:u,weekday:l,...ah(e)}}function Sx(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=uy(cy(r,1,t),n),l=Kl(r);let u=o*7+i-a-7+t,p;u<1?(p=r-1,u+=Kl(p)):u>l?(p=r+1,u-=Kl(r)):p=r;const{month:g,day:_}=bS(p,u);return{year:p,month:g,day:_,...ah(e)}}function $p(e){const{year:t,month:n,day:r}=e,o=vS(t,n,r);return{year:t,ordinal:o,...ah(e)}}function Ox(e){const{year:t,ordinal:n}=e,{month:r,day:o}=bS(t,n);return{year:t,month:r,day:o,...ah(e)}}function Ax(e,t){if(!Gt(e.localWeekday)||!Gt(e.localWeekNumber)||!Gt(e.localWeekYear)){if(!Gt(e.weekday)||!Gt(e.weekNumber)||!Gt(e.weekYear))throw new Fl("Cannot mix locale-based week fields with ISO-based week fields");return Gt(e.localWeekday)||(e.weekday=e.localWeekday),Gt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Gt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function RY(e,t=4,n=1){const r=rh(e.weekYear),o=Eo(e.weekNumber,1,ku(e.weekYear,t,n)),i=Eo(e.weekday,1,7);return r?o?i?!1:xo("weekday",e.weekday):xo("week",e.weekNumber):xo("weekYear",e.weekYear)}function $Y(e){const t=rh(e.year),n=Eo(e.ordinal,1,Kl(e.year));return t?n?!1:xo("ordinal",e.ordinal):xo("year",e.year)}function _S(e){const t=rh(e.year),n=Eo(e.month,1,12),r=Eo(e.day,1,wf(e.year,e.month));return t?n?r?!1:xo("day",e.day):xo("month",e.month):xo("year",e.year)}function xS(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Eo(t,0,23)||t===24&&n===0&&r===0&&o===0,a=Eo(n,0,59),l=Eo(r,0,59),u=Eo(o,0,999);return i?a?l?u?!1:xo("millisecond",o):xo("second",r):xo("minute",n):xo("hour",t)}function Gt(e){return typeof e>"u"}function _s(e){return typeof e=="number"}function rh(e){return typeof e=="number"&&e%1===0}function DY(e){return typeof e=="string"}function kY(e){return Object.prototype.toString.call(e)==="[object Date]"}function ES(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function CS(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function MY(e){return Array.isArray(e)?e:[e]}function Rx(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function PY(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Zl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Tg(e){if(e==null)return null;if(typeof e!="object")throw new Gr("Week settings must be an object");if(!Eo(e.firstDay,1,7)||!Eo(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Eo(t,1,7)))throw new Gr("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Eo(e,t,n){return rh(e)&&e>=t&&e<=n}function IY(e,t){return e-t*Math.floor(e/t)}function Xn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function $a(e){if(!(Gt(e)||e===null||e===""))return parseInt(e,10)}function ps(e){if(!(Gt(e)||e===null||e===""))return parseFloat(e)}function dy(e){if(!(Gt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function fy(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Vu(e){return e%4===0&&(e%100!==0||e%400===0)}function Kl(e){return Vu(e)?366:365}function wf(e,t){const n=IY(t-1,12)+1,r=e+(t-n)/12;return n===2?Vu(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function oh(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function $x(e,t,n){return-uy(cy(e,1,t),n)+t-1}function ku(e,t=4,n=1){const r=$x(e,t,n),o=$x(e+1,t,n);return(Kl(e)-r+o)/7}function Ng(e){return e>99?e:e>Yn.twoDigitCutoffYear?1900+e:2e3+e}function wS(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},l=new Intl.DateTimeFormat(n,a).formatToParts(o).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function ih(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function TS(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Gr(`Invalid unit value ${e}`);return t}function Tf(e,t){const n={};for(const r in e)if(Zl(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=TS(o)}return n}function Tu(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Xn(n,2)}:${Xn(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Xn(n,2)}${Xn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ah(e){return PY(e,["hour","minute","second","millisecond"])}const LY=["January","February","March","April","May","June","July","August","September","October","November","December"],NS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],FY=["J","F","M","A","M","J","J","A","S","O","N","D"];function SS(e){switch(e){case"narrow":return[...FY];case"short":return[...NS];case"long":return[...LY];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const OS=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],AS=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],jY=["M","T","W","T","F","S","S"];function RS(e){switch(e){case"narrow":return[...jY];case"short":return[...AS];case"long":return[...OS];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const $S=["AM","PM"],BY=["Before Christ","Anno Domini"],WY=["BC","AD"],zY=["B","A"];function DS(e){switch(e){case"narrow":return[...zY];case"short":return[...WY];case"long":return[...BY];default:return null}}function HY(e){return $S[e.hour<12?0:1]}function GY(e,t){return RS(t)[e.weekday-1]}function KY(e,t){return SS(t)[e.month-1]}function UY(e,t){return DS(t)[e.year<0?0:1]}function VY(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const _=e==="days";switch(t){case 1:return _?"tomorrow":`next ${o[e][0]}`;case-1:return _?"yesterday":`last ${o[e][0]}`;case 0:return _?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,l=Math.abs(t),u=l===1,p=o[e],g=r?u?p[1]:p[2]||p[1]:u?o[e][0]:e;return a?`${l} ${g} ago`:`in ${l} ${g}`}function Dx(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const YY={D:Ef,DD:JN,DDD:XN,DDDD:QN,t:eS,tt:tS,ttt:nS,tttt:rS,T:oS,TT:iS,TTT:aS,TTTT:sS,f:lS,ff:uS,fff:fS,ffff:pS,F:cS,FF:dS,FFF:hS,FFFF:gS};class Rr{static create(t,n={}){return new Rr(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const l=t.charAt(a);l==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||l===n?r+=l:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return YY[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Xn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(b,y)=>this.loc.extract(t,b,y),a=b=>t.isOffsetFixed&&t.offset===0&&b.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,b.format):"",l=()=>r?HY(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(b,y)=>r?KY(t,b):i(y?{month:b}:{month:b,day:"numeric"},"month"),p=(b,y)=>r?GY(t,b):i(y?{weekday:b}:{weekday:b,month:"long",day:"numeric"},"weekday"),g=b=>{const y=Rr.macroTokenToFormatOpts(b);return y?this.formatWithSystemDefault(t,y):b},_=b=>r?UY(t,b):i({era:b},"era"),C=b=>{switch(b){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return _("short");case"GG":return _("long");case"GGGGG":return _("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return g(b)}};return Dx(Rr.parseFormat(n),C)}formatDurationFromString(t,n){const r=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=u=>p=>{const g=r(p);return g?this.num(u.get(g),p.length):p},i=Rr.parseFormat(n),a=i.reduce((u,{literal:p,val:g})=>p?u:u.concat(g),[]),l=t.shiftTo(...a.map(r).filter(u=>u));return Dx(i,o(l))}}const kS=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function mc(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function yc(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,l,u]=i(t,o);return[{...n,...a},l||r,u]},[{},null,1]).slice(0,2)}function vc(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function MS(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=$a(t[n+o]);return[r,null,n+o]}}const PS=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,qY=`(?:${PS.source}?(?:\\[(${kS.source})\\])?)?`,hy=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,IS=RegExp(`${hy.source}${qY}`),py=RegExp(`(?:T${IS.source})?`),ZY=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,JY=/(\d{4})-?W(\d\d)(?:-?(\d))?/,XY=/(\d{4})-?(\d{3})/,QY=MS("weekYear","weekNumber","weekDay"),eq=MS("year","ordinal"),tq=/(\d{4})-(\d\d)-(\d\d)/,LS=RegExp(`${hy.source} ?(?:${PS.source}|(${kS.source}))?`),nq=RegExp(`(?: ${LS.source})?`);function Ul(e,t,n){const r=e[t];return Gt(r)?n:$a(r)}function rq(e,t){return[{year:Ul(e,t),month:Ul(e,t+1,1),day:Ul(e,t+2,1)},null,t+3]}function bc(e,t){return[{hours:Ul(e,t,0),minutes:Ul(e,t+1,0),seconds:Ul(e,t+2,0),milliseconds:dy(e[t+3])},null,t+4]}function Yu(e,t){const n=!e[t]&&!e[t+1],r=ih(e[t+1],e[t+2]),o=n?null:Fr.instance(r);return[{},o,t+3]}function qu(e,t){const n=e[t]?Xi.create(e[t]):null;return[{},n,t+1]}const oq=RegExp(`^T?${hy.source}$`),iq=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function aq(e){const[t,n,r,o,i,a,l,u,p]=e,g=t[0]==="-",_=u&&u[0]==="-",C=(b,y=!1)=>b!==void 0&&(y||b&&g)?-b:b;return[{years:C(ps(n)),months:C(ps(r)),weeks:C(ps(o)),days:C(ps(i)),hours:C(ps(a)),minutes:C(ps(l)),seconds:C(ps(u),u==="-0"),milliseconds:C(dy(p),_)}]}const sq={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function gy(e,t,n,r,o,i,a){const l={year:t.length===2?Ng($a(t)):$a(t),month:NS.indexOf(n)+1,day:$a(r),hour:$a(o),minute:$a(i)};return a&&(l.second=$a(a)),e&&(l.weekday=e.length>3?OS.indexOf(e)+1:AS.indexOf(e)+1),l}const lq=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function cq(e){const[,t,n,r,o,i,a,l,u,p,g,_]=e,C=gy(t,o,r,n,i,a,l);let b;return u?b=sq[u]:p?b=0:b=ih(g,_),[C,new Fr(b)]}function uq(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const dq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,fq=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,hq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function kx(e){const[,t,n,r,o,i,a,l]=e;return[gy(t,o,r,n,i,a,l),Fr.utcInstance]}function pq(e){const[,t,n,r,o,i,a,l]=e;return[gy(t,l,n,r,o,i,a),Fr.utcInstance]}const gq=mc(ZY,py),mq=mc(JY,py),yq=mc(XY,py),vq=mc(IS),FS=yc(rq,bc,Yu,qu),bq=yc(QY,bc,Yu,qu),_q=yc(eq,bc,Yu,qu),xq=yc(bc,Yu,qu);function Eq(e){return vc(e,[gq,FS],[mq,bq],[yq,_q],[vq,xq])}function Cq(e){return vc(uq(e),[lq,cq])}function wq(e){return vc(e,[dq,kx],[fq,kx],[hq,pq])}function Tq(e){return vc(e,[iq,aq])}const Nq=yc(bc);function Sq(e){return vc(e,[oq,Nq])}const Oq=mc(tq,nq),Aq=mc(LS),Rq=yc(bc,Yu,qu);function $q(e){return vc(e,[Oq,FS],[Aq,Rq])}const Mx="Invalid Duration",jS={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Dq={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...jS},bo=146097/400,bl=146097/4800,kq={years:{quarters:4,months:12,weeks:bo/7,days:bo,hours:bo*24,minutes:bo*24*60,seconds:bo*24*60*60,milliseconds:bo*24*60*60*1e3},quarters:{months:3,weeks:bo/28,days:bo/4,hours:bo*24/4,minutes:bo*24*60/4,seconds:bo*24*60*60/4,milliseconds:bo*24*60*60*1e3/4},months:{weeks:bl/7,days:bl,hours:bl*24,minutes:bl*24*60,seconds:bl*24*60*60,milliseconds:bl*24*60*60*1e3},...jS},bs=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Mq=bs.slice(0).reverse();function Oa(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new rn(r)}function BS(e,t){let n=t.milliseconds??0;for(const r of Mq.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Px(e,t){const n=BS(e,t)<0?-1:1;bs.reduceRight((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],l=Math.floor(i/a);t[o]+=l*n,t[r]-=l*a*n}return o},null),bs.reduce((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function Pq(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class rn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?kq:Dq;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||mn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return rn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Gr(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new rn({values:Tf(t,rn.normalizeUnit),loc:mn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(_s(t))return rn.fromMillis(t);if(rn.isDuration(t))return t;if(typeof t=="object")return rn.fromObject(t);throw new Gr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Tq(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=Sq(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Gr("need to specify a reason the Duration is invalid");const r=t instanceof Ho?t:new Ho(t,n);if(Yn.throwOnInvalid)throw new lY(r);return new rn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new ZN(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Rr.create(this.loc,r).formatDurationFromString(this,t):Mx}toHuman(t={}){if(!this.isValid)return Mx;const n=bs.map(r=>{const o=this.values[r];return Gt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=fy(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},It.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?BS(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t),r={};for(const o of bs)(Zl(n.values,o)||Zl(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Oa(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=TS(t(this.values[r],r));return Oa(this,{values:n},!0)}get(t){return this[rn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Tf(t,rn.normalizeUnit)};return Oa(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Oa(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Px(this.matrix,t),Oa(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Pq(this.normalize().shiftToAll().toObject());return Oa(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>rn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of bs)if(t.indexOf(a)>=0){i=a;let l=0;for(const p in r)l+=this.matrix[p][a]*r[p],r[p]=0;_s(o[a])&&(l+=o[a]);const u=Math.trunc(l);n[a]=u,r[a]=(l*1e3-u*1e3)/1e3}else _s(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return Px(this.matrix,n),Oa(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Oa(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of bs)if(!n(this.values[r],t.values[r]))return!1;return!0}}const _l="Invalid Interval";function Iq(e,t){return!e||!e.isValid?Hn.invalid("missing or invalid start"):!t||!t.isValid?Hn.invalid("missing or invalid end"):t<e?Hn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Hn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Gr("need to specify a reason the Interval is invalid");const r=t instanceof Ho?t:new Ho(t,n);if(Yn.throwOnInvalid)throw new sY(r);return new Hn({invalid:r})}static fromDateTimes(t,n){const r=yu(t),o=yu(n);return Iq(r,o)??new Hn({start:r,end:o})}static after(t,n){const r=rn.fromDurationLike(n),o=yu(t);return Hn.fromDateTimes(o,o.plus(r))}static before(t,n){const r=rn.fromDurationLike(n),o=yu(t);return Hn.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=It.fromISO(r,n),a=i.isValid}catch{a=!1}let l,u;try{l=It.fromISO(o,n),u=l.isValid}catch{u=!1}if(a&&u)return Hn.fromDateTimes(i,l);if(a){const p=rn.fromISO(o,n);if(p.isValid)return Hn.after(i,p)}else if(u){const p=rn.fromISO(r,n);if(p.isValid)return Hn.before(l,p)}}return Hn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Hn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(yu).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,l=+a>+this.e?this.e:a;r.push(Hn.fromDateTimes(o,l)),o=l,i+=1}return r}splitBy(t){const n=rn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const l=this.start.plus(n.mapUnits(u=>u*o));i=+l>+this.e?this.e:l,a.push(Hn.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Hn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Hn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),l=a.sort((u,p)=>u.time-p.time);for(const u of l)r+=u.type==="s"?1:-1,r===1?n=u.time:(n&&+n!=+u.time&&o.push(Hn.fromDateTimes(n,u.time)),n=null);return Hn.merge(o)}difference(...t){return Hn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:_l}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Ef,n={}){return this.isValid?Rr.create(this.s.loc.clone(n),t).formatInterval(this):_l}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:_l}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:_l}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:_l}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:_l}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):rn.invalid(this.invalidReason)}mapEndpoints(t){return Hn.fromDateTimes(t(this.s),t(this.e))}}class Gd{static hasDST(t=Yn.defaultZone){const n=It.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Xi.isValidZone(t)}static normalizeZone(t){return Da(t,Yn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||mn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||mn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||mn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||mn.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||mn.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||mn.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||mn.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return mn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return mn.create(n,null,"gregory").eras(t)}static features(){return{relative:ES(),localeWeek:CS()}}}function Ix(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(rn.fromMillis(r).as("days"))}function Lq(e,t,n){const r=[["years",(u,p)=>p.year-u.year],["quarters",(u,p)=>p.quarter-u.quarter+(p.year-u.year)*4],["months",(u,p)=>p.month-u.month+(p.year-u.year)*12],["weeks",(u,p)=>{const g=Ix(u,p);return(g-g%7)/7}],["days",Ix]],o={},i=e;let a,l;for(const[u,p]of r)n.indexOf(u)>=0&&(a=u,o[u]=p(e,t),l=i.plus(o),l>t?(o[u]--,e=i.plus(o),e>t&&(l=e,o[u]--,e=i.plus(o))):e=l);return[e,o,l,a]}function Fq(e,t,n,r){let[o,i,a,l]=Lq(e,t,n);const u=t-o,p=n.filter(_=>["hours","minutes","seconds","milliseconds"].indexOf(_)>=0);p.length===0&&(a<t&&(a=o.plus({[l]:1})),a!==o&&(i[l]=(i[l]||0)+u/(a-o)));const g=rn.fromObject(i,r);return p.length>0?rn.fromMillis(u,r).shiftTo(...p).plus(g):g}const my={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Lx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},jq=my.hanidec.replace(/[\[|\]]/g,"").split("");function Bq(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(my.hanidec)!==-1)t+=jq.indexOf(e[n]);else for(const o in Lx){const[i,a]=Lx[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}function Fo({numberingSystem:e},t=""){return new RegExp(`${my[e||"latn"]}${t}`)}const Wq="missing Intl.DateTimeFormat.formatToParts support";function ln(e,t=n=>n){return{regex:e,deser:([n])=>t(Bq(n))}}const zq=" ",WS=`[ ${zq}]`,zS=new RegExp(WS,"g");function Hq(e){return e.replace(/\./g,"\\.?").replace(zS,WS)}function Fx(e){return e.replace(/\./g,"").replace(zS," ").toLowerCase()}function jo(e,t){return e===null?null:{regex:RegExp(e.map(Hq).join("|")),deser:([n])=>e.findIndex(r=>Fx(n)===Fx(r))+t}}function jx(e,t){return{regex:e,deser:([,n,r])=>ih(n,r),groups:t}}function Kd(e){return{regex:e,deser:([t])=>t}}function Gq(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Kq(e,t){const n=Fo(t),r=Fo(t,"{2}"),o=Fo(t,"{3}"),i=Fo(t,"{4}"),a=Fo(t,"{6}"),l=Fo(t,"{1,2}"),u=Fo(t,"{1,3}"),p=Fo(t,"{1,6}"),g=Fo(t,"{1,9}"),_=Fo(t,"{2,4}"),C=Fo(t,"{4,6}"),b=v=>({regex:RegExp(Gq(v.val)),deser:([T])=>T,literal:!0}),y=(v=>{if(e.literal)return b(v);switch(v.val){case"G":return jo(t.eras("short"),0);case"GG":return jo(t.eras("long"),0);case"y":return ln(p);case"yy":return ln(_,Ng);case"yyyy":return ln(i);case"yyyyy":return ln(C);case"yyyyyy":return ln(a);case"M":return ln(l);case"MM":return ln(r);case"MMM":return jo(t.months("short",!0),1);case"MMMM":return jo(t.months("long",!0),1);case"L":return ln(l);case"LL":return ln(r);case"LLL":return jo(t.months("short",!1),1);case"LLLL":return jo(t.months("long",!1),1);case"d":return ln(l);case"dd":return ln(r);case"o":return ln(u);case"ooo":return ln(o);case"HH":return ln(r);case"H":return ln(l);case"hh":return ln(r);case"h":return ln(l);case"mm":return ln(r);case"m":return ln(l);case"q":return ln(l);case"qq":return ln(r);case"s":return ln(l);case"ss":return ln(r);case"S":return ln(u);case"SSS":return ln(o);case"u":return Kd(g);case"uu":return Kd(l);case"uuu":return ln(n);case"a":return jo(t.meridiems(),0);case"kkkk":return ln(i);case"kk":return ln(_,Ng);case"W":return ln(l);case"WW":return ln(r);case"E":case"c":return ln(n);case"EEE":return jo(t.weekdays("short",!1),1);case"EEEE":return jo(t.weekdays("long",!1),1);case"ccc":return jo(t.weekdays("short",!0),1);case"cccc":return jo(t.weekdays("long",!0),1);case"Z":case"ZZ":return jx(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return jx(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return Kd(/[a-z_+-/]{1,256}?/i);case" ":return Kd(/[^\S\n\r]/);default:return b(v)}})(e)||{invalidReason:Wq};return y.token=e,y}const Uq={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Vq(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const u=/^\s+$/.test(o);return{literal:!u,val:u?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let l=Uq[a];if(typeof l=="object"&&(l=l[i]),l)return{literal:!1,val:l}}function Yq(e){return[`^${e.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,e]}function qq(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(Zl(n,a)){const l=n[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(o[l.token.val[0]]=l.deser(r.slice(i,i+u))),i+=u}return[r,o]}else return[r,{}]}function Zq(e){const t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Gt(e.z)||(n=Xi.create(e.z)),Gt(e.Z)||(n||(n=new Fr(e.Z)),r=e.Z),Gt(e.q)||(e.M=(e.q-1)*3+1),Gt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Gt(e.u)||(e.S=dy(e.u)),[Object.keys(e).reduce((o,i)=>{const a=t(i);return a&&(o[a]=e[i]),o},{}),n,r]}let Dp=null;function Jq(){return Dp||(Dp=It.fromMillis(1555555555555)),Dp}function Xq(e,t){if(e.literal)return e;const n=Rr.macroTokenToFormatOpts(e.val),r=KS(n,t);return r==null||r.includes(void 0)?e:r}function HS(e,t){return Array.prototype.concat(...e.map(n=>Xq(n,t)))}function GS(e,t,n){const r=HS(Rr.parseFormat(n),e),o=r.map(a=>Kq(a,e)),i=o.find(a=>a.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[a,l]=Yq(o),u=RegExp(a,"i"),[p,g]=qq(t,u,l),[_,C,b]=g?Zq(g):[null,null,void 0];if(Zl(g,"a")&&Zl(g,"H"))throw new Fl("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:u,rawMatches:p,matches:g,result:_,zone:C,specificOffset:b}}}function Qq(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=GS(e,t,n);return[r,o,i,a]}function KS(e,t){if(!e)return null;const n=Rr.create(t,e).dtFormatter(Jq()),r=n.formatToParts(),o=n.resolvedOptions();return r.map(i=>Vq(i,e,o))}const kp="Invalid DateTime",Bx=864e13;function Ud(e){return new Ho("unsupported zone",`the zone "${e.name}" is not supported`)}function Mp(e){return e.weekData===null&&(e.weekData=Cf(e.c)),e.weekData}function Pp(e){return e.localWeekData===null&&(e.localWeekData=Cf(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function gs(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new It({...n,...t,old:n})}function US(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function Vd(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function nf(e,t,n){return US(oh(e),t,n)}function Wx(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,wf(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=rn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=oh(i);let[u,p]=US(l,n,e.zone);return a!==0&&(u+=a,p=e.zone.offset(u)),{ts:u,o:p}}function mu(e,t,n,r,o,i){const{setZone:a,zone:l}=n;if(e&&Object.keys(e).length!==0||t){const u=t||l,p=It.fromObject(e,{...n,zone:u,specificOffset:i});return a?p:p.setZone(l)}else return It.invalid(new Ho("unparsable",`the input "${o}" can't be parsed as ${r}`))}function Yd(e,t,n=!0){return e.isValid?Rr.create(mn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Ip(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Xn(e.c.year,n?6:4),t?(r+="-",r+=Xn(e.c.month),r+="-",r+=Xn(e.c.day)):(r+=Xn(e.c.month),r+=Xn(e.c.day)),r}function zx(e,t,n,r,o,i){let a=Xn(e.c.hour);return t?(a+=":",a+=Xn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Xn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Xn(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Xn(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Xn(Math.trunc(-e.o/60)),a+=":",a+=Xn(Math.trunc(-e.o%60))):(a+="+",a+=Xn(Math.trunc(e.o/60)),a+=":",a+=Xn(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const VS={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},eZ={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},tZ={ordinal:1,hour:0,minute:0,second:0,millisecond:0},YS=["year","month","day","hour","minute","second","millisecond"],nZ=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],rZ=["year","ordinal","hour","minute","second","millisecond"];function oZ(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new ZN(e);return t}function Hx(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return oZ(e)}}function Gx(e,t){const n=Da(t.zone,Yn.defaultZone),r=mn.fromObject(t),o=Yn.now();let i,a;if(Gt(e.year))i=o;else{for(const p of YS)Gt(e[p])&&(e[p]=VS[p]);const l=_S(e)||xS(e);if(l)return It.invalid(l);const u=n.offset(o);[i,a]=nf(e,u,n)}return new It({ts:i,zone:n,loc:r,o:a})}function Kx(e,t,n){const r=Gt(n.round)?!0:n.round,o=(a,l)=>(a=fy(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,l)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const l=i(a);if(Math.abs(l)>=1)return o(l,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function Ux(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class It{constructor(t){const n=t.zone||Yn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Ho("invalid input"):null)||(n.isValid?null:Ud(n));this.ts=Gt(t.ts)?Yn.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=n.offset(this.ts);o=Vd(this.ts,a),r=Number.isNaN(o.year)?new Ho("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=t.loc||mn.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new It({})}static local(){const[t,n]=Ux(arguments),[r,o,i,a,l,u,p]=n;return Gx({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static utc(){const[t,n]=Ux(arguments),[r,o,i,a,l,u,p]=n;return t.zone=Fr.utcInstance,Gx({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static fromJSDate(t,n={}){const r=kY(t)?t.valueOf():NaN;if(Number.isNaN(r))return It.invalid("invalid input");const o=Da(n.zone,Yn.defaultZone);return o.isValid?new It({ts:r,zone:o,loc:mn.fromObject(n)}):It.invalid(Ud(o))}static fromMillis(t,n={}){if(_s(t))return t<-Bx||t>Bx?It.invalid("Timestamp out of range"):new It({ts:t,zone:Da(n.zone,Yn.defaultZone),loc:mn.fromObject(n)});throw new Gr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(_s(t))return new It({ts:t*1e3,zone:Da(n.zone,Yn.defaultZone),loc:mn.fromObject(n)});throw new Gr("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Da(n.zone,Yn.defaultZone);if(!r.isValid)return It.invalid(Ud(r));const o=mn.fromObject(n),i=Tf(t,Hx),{minDaysInFirstWeek:a,startOfWeek:l}=Ax(i,o),u=Yn.now(),p=Gt(n.specificOffset)?r.offset(u):n.specificOffset,g=!Gt(i.ordinal),_=!Gt(i.year),C=!Gt(i.month)||!Gt(i.day),b=_||C,y=i.weekYear||i.weekNumber;if((b||g)&&y)throw new Fl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(C&&g)throw new Fl("Can't mix ordinal dates with month/day");const v=y||i.weekday&&!b;let T,O,R=Vd(u,p);v?(T=nZ,O=eZ,R=Cf(R,a,l)):g?(T=rZ,O=tZ,R=$p(R)):(T=YS,O=VS);let k=!1;for(const U of T){const Q=i[U];Gt(Q)?k?i[U]=O[U]:i[U]=R[U]:k=!0}const P=v?RY(i,a,l):g?$Y(i):_S(i),M=P||xS(i);if(M)return It.invalid(M);const Y=v?Sx(i,a,l):g?Ox(i):i,[X,oe]=nf(Y,p,r),Z=new It({ts:X,zone:r,o:oe,loc:o});return i.weekday&&b&&t.weekday!==Z.weekday?It.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Z.toISO()}`):Z}static fromISO(t,n={}){const[r,o]=Eq(t);return mu(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=Cq(t);return mu(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=wq(t);return mu(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Gt(t)||Gt(n))throw new Gr("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=mn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[l,u,p,g]=Qq(a,t,n);return g?It.invalid(g):mu(l,u,r,`format ${n}`,t,p)}static fromString(t,n,r={}){return It.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=$q(t);return mu(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Gr("need to specify a reason the DateTime is invalid");const r=t instanceof Ho?t:new Ho(t,n);if(Yn.throwOnInvalid)throw new aY(r);return new It({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=KS(t,mn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return HS(Rr.parseFormat(t),mn.fromObject(n)).map(r=>r.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Mp(this).weekYear:NaN}get weekNumber(){return this.isValid?Mp(this).weekNumber:NaN}get weekday(){return this.isValid?Mp(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Pp(this).weekday:NaN}get localWeekNumber(){return this.isValid?Pp(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Pp(this).weekYear:NaN}get ordinal(){return this.isValid?$p(this.c).ordinal:NaN}get monthShort(){return this.isValid?Gd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Gd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Gd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Gd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=oh(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),l=this.zone.offset(r-i*n);if(a===l)return[this];const u=r-a*n,p=r-l*n,g=Vd(u,a),_=Vd(p,l);return g.hour===_.hour&&g.minute===_.minute&&g.second===_.second&&g.millisecond===_.millisecond?[gs(this,{ts:u}),gs(this,{ts:p})]:[this]}get isInLeapYear(){return Vu(this.year)}get daysInMonth(){return wf(this.year,this.month)}get daysInYear(){return this.isValid?Kl(this.year):NaN}get weeksInWeekYear(){return this.isValid?ku(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ku(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Rr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Fr.instance(t),n)}toLocal(){return this.setZone(Yn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Da(t,Yn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=nf(a,i,t)}return gs(this,{ts:o,zone:t})}else return It.invalid(Ud(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return gs(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Tf(t,Hx),{minDaysInFirstWeek:r,startOfWeek:o}=Ax(n,this.loc),i=!Gt(n.weekYear)||!Gt(n.weekNumber)||!Gt(n.weekday),a=!Gt(n.ordinal),l=!Gt(n.year),u=!Gt(n.month)||!Gt(n.day),p=l||u,g=n.weekYear||n.weekNumber;if((p||a)&&g)throw new Fl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Fl("Can't mix ordinal dates with month/day");let _;i?_=Sx({...Cf(this.c,r,o),...n},r,o):Gt(n.ordinal)?(_={...this.toObject(),...n},Gt(n.day)&&(_.day=Math.min(wf(_.year,_.month),_.day))):_=Ox({...$p(this.c),...n});const[C,b]=nf(_,this.o,this.zone);return gs(this,{ts:C,o:b})}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return gs(this,Wx(this,n))}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t).negate();return gs(this,Wx(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=rn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?Rr.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):kp}toLocaleString(t=Ef,n={}){return this.isValid?Rr.create(this.loc.clone(n),t).formatDateTime(this):kp}toLocaleParts(t={}){return this.isValid?Rr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let l=Ip(this,a);return l+="T",l+=zx(this,a,n,r,o,i),l}toISODate({format:t="extended"}={}){return this.isValid?Ip(this,t==="extended"):null}toISOWeekDate(){return Yd(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+zx(this,a==="extended",n,t,r,i):null}toRFC2822(){return Yd(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Yd(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ip(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),Yd(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():kp}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return rn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=MY(n).map(rn.normalizeUnit),a=t.valueOf()>this.valueOf(),l=a?this:t,u=a?t:this,p=Fq(l,u,i,o);return a?p.negate():p}diffNow(t="milliseconds",n={}){return this.diff(It.now(),t,n)}until(t){return this.isValid?Hn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||It.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),Kx(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?Kx(t.base||It.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(It.isDateTime))throw new Gr("min requires all arguments be DateTimes");return Rx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(It.isDateTime))throw new Gr("max requires all arguments be DateTimes");return Rx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=mn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return GS(a,t,n)}static fromStringExplain(t,n,r={}){return It.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return Ef}static get DATE_MED(){return JN}static get DATE_MED_WITH_WEEKDAY(){return cY}static get DATE_FULL(){return XN}static get DATE_HUGE(){return QN}static get TIME_SIMPLE(){return eS}static get TIME_WITH_SECONDS(){return tS}static get TIME_WITH_SHORT_OFFSET(){return nS}static get TIME_WITH_LONG_OFFSET(){return rS}static get TIME_24_SIMPLE(){return oS}static get TIME_24_WITH_SECONDS(){return iS}static get TIME_24_WITH_SHORT_OFFSET(){return aS}static get TIME_24_WITH_LONG_OFFSET(){return sS}static get DATETIME_SHORT(){return lS}static get DATETIME_SHORT_WITH_SECONDS(){return cS}static get DATETIME_MED(){return uS}static get DATETIME_MED_WITH_SECONDS(){return dS}static get DATETIME_MED_WITH_WEEKDAY(){return uY}static get DATETIME_FULL(){return fS}static get DATETIME_FULL_WITH_SECONDS(){return hS}static get DATETIME_HUGE(){return pS}static get DATETIME_HUGE_WITH_SECONDS(){return gS}}function yu(e){if(It.isDateTime(e))return e;if(e&&e.valueOf&&_s(e.valueOf()))return It.fromJSDate(e);if(e&&typeof e=="object")return It.fromObject(e);throw new Gr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var hn=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(hn||{});function yy(e){const t={1:hn.Monday,2:hn.Tuesday,3:hn.Wednesday,4:hn.Thursday,5:hn.Friday,6:hn.Saturday,7:hn.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function yi(e){return{[hn.Monday]:"Monday",[hn.Tuesday]:"Tuesday",[hn.Wednesday]:"Wednesday",[hn.Thursday]:"Thursday",[hn.Friday]:"Friday",[hn.Saturday]:"Saturday",[hn.Sunday]:"Sunday"}[e]}class Vx{constructor(t,n,r){io(this,"end"),io(this,"start"),this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(u=>{if(u.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[o,i]=n.start.split(":"),[a,l]=n.end.split(":");this.end=this.end.set({hour:Number(a),minute:Number(l)}),this.start=this.start.set({hour:Number(o),minute:Number(i)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r)}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r)}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class qS{constructor(t,n){io(this,"holidayHoursByDate"),io(this,"hours"),io(this,"timezone"),this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;let n=t;n=n.minus({days:1});for(const r of[n,t]){const o=this.getHours(r);if(o&&!o.isClosed)for(const i of o.openIntervals||[]){const a=new Vx(r,i,this.timezone);if(a.contains(t))return a}}return null}getCurrentInterval(){return this.getInterval(It.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(i,a)=>i.start===a.start?0:i.start>a.start?1:-1,o=n.sort(r);for(const[i,a]of o.entries())if(a.contains(t)&&o.length>i+1)return o[i+1];for(const i of o)if(i.start>t)return i;return null}getIntervalsForNDays(t,n){const r=[];for(let o=0;o<t;o++){let i=n;i=i.plus({days:o});const a=this.getHours(i);a&&!a.isClosed&&r.push(...a.openIntervals.map(l=>new Vx(i,l,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=yi(yy(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(It.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,o,i]=n,a=It.fromObject({year:Number(r),month:Number(o),day:Number(i)},{zone:this.timezone});if(t<a)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(It.now())}}function iZ(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function aZ(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function Zu(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function Ju(e){return!e.futureInterval}function sZ(e){return Zu(e)?an.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):Ju(e)?an.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):an.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function lZ(e){return Zu(e)||Ju(e)?null:an.jsx("span",{className:"HoursStatus-separator",children:" • "})}function cZ(e){return Zu(e)||Ju(e)?null:an.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function uZ(e){if(Zu(e)||Ju(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return an.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function dZ(e){var t,n;if(Zu(e)||Ju(e))return null;const r={weekday:"long",...e.dayOptions??{}};let o="";if(e.isOpen){const i=e.currentInterval;o+=((t=i==null?void 0:i.end)==null?void 0:t.setLocale("en-US").toLocaleString(r))||""}else{const i=e.futureInterval;o+=((n=i==null?void 0:i.start)==null?void 0:n.setLocale("en-US").toLocaleString(r))||""}return an.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",o]})}function fZ(e,t){const n=e.currentTemplate||sZ,r=e.separatorTemplate||lZ,o=e.futureTemplate||cZ,i=e.timeTemplate||uZ,a=e.dayOfWeekTemplate||dZ;return an.jsxs("div",{className:$u("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),o(e),i(e),a(e)]})}const hZ=e=>{const[t,n]=H.useState(!1),[r,o]=H.useState(!1);H.useEffect(()=>{o(!0)},[]);const i=e.statusTemplate||fZ,a=new qS(e.hours,e.timezone),l=a.isOpenNow(),u=a.getCurrentInterval(),p=a.getNextInterval(),g=(u==null?void 0:u.end)||(p==null?void 0:p.start);if(g&&!t){n(!0);const C=g.toMillis()-It.now().toMillis();setTimeout(()=>n(!1),C)}const _={isOpen:l,currentInterval:u,futureInterval:p,...e};return an.jsx(an.Fragment,{children:r&&i(_,e)})};function pZ(e,t){const n=[];return e.forEach(r=>{const o=n[n.length-1];o?aZ(o.intervals,r.intervals)?(o.endDay=r.endDay,o.isToday=o.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const o=t&&yi(r.startDay)in t?t[yi(r.startDay)]||"":yi(r.startDay),i=t&&yi(r.endDay)in t?t[yi(r.endDay)]||"":yi(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${o}`:`${o} - ${i}`}})}function gZ(e,t){const n=[],r=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):e.intervals.forEach(o=>{const i=o.getStartTime("en-US",t),a=o.getEndTime("en-US",t);n.push(`${i} - ${a}`)}),n}function mZ(e,t,n){const r=[];for(let o=1;o<=7;o++){const i=It.fromObject({weekday:o}),a=yy(i);r.push({startDay:a,endDay:a,dayName:n&&yi(a).toLowerCase()in n?n[yi(a).toLowerCase()]||"":yi(a),intervals:e.filter(l=>l.start.weekday===o),isToday:t.weekday===o})}return r}const yZ=e=>{const[t,n]=H.useState(!1);H.useEffect(()=>{n(!0)},[]);const r=new qS(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),o=It.now(),i=r.getIntervalsForNDays(7,o);let a=mZ(i,o,e.dayOfWeekNames);function l(g){return g?{today:yy(o),monday:hn.Monday,tuesday:hn.Tuesday,wednesday:hn.Wednesday,thursday:hn.Thursday,friday:hn.Friday,saturday:hn.Saturday,sunday:hn.Sunday}[g]:hn.Sunday}let u=[hn.Sunday,hn.Monday,hn.Tuesday,hn.Wednesday,hn.Thursday,hn.Friday,hn.Saturday];const p=u.indexOf(l(e.startOfWeek));return u=iZ(u,7-p),a.sort((g,_)=>u.indexOf(g.startDay)-u.indexOf(_.startDay)),e.collapseDays&&(a=pZ(a,e.dayOfWeekNames)),an.jsx(an.Fragment,{children:t&&an.jsx("div",{className:$u("HoursTable",e.className),children:a.map(g=>{const _=(e.intervalStringsBuilderFn||gZ)(g,e.timeOptions);return an.jsxs("div",{className:$u("HoursTable-row",{"is-today":g.isToday}),children:[an.jsx("span",{className:"HoursTable-day",children:g.dayName}),an.jsx("span",{className:"HoursTable-intervals",children:_.map((C,b)=>an.jsx("span",{className:"HoursTable-interval",children:C},b))})]},g.dayName)})})})},Sg=Math.log2(1.6745627884839434),vZ=4,bZ=19,Og="js-baidu-neg-lng-fix";let ZS;const _Z=new Promise(e=>ZS=e),xZ="https://api.map.baidu.com/geoconv/v1/";let vu=[];const EZ="gcj02ToBD09Callback_b872c21c";let CZ=0,Yx;async function JS(e){return await new Promise((t,n)=>{vu.push({coordinates:e,resolve:t,reject:n}),vu.length===1&&(Yx=setTimeout(r,100)),vu.length>40&&(clearTimeout(Yx),r());function r(){const o=vu;vu=[];const i=[].concat(...o.map(u=>u.coordinates)),a=EZ+"_"+CZ++,l=document.createElement("script");window[a]=u=>{if(u.status){const _=new Error(`Unable to convert coordinates to BD-09: Received status code ${u.status}${u.message?": "+u.message:""}`);o.forEach(C=>C.reject(_))}const p=u.result.map(_=>new pc(_.y,_.x));let g=0;o.forEach(_=>{_.resolve(p.slice(g,g+=_.coordinates.length))}),delete window[a],l.parentNode.removeChild(l)},_Z.then(u=>{const p={ak:u,callback:a,coords:i.map(g=>`${g.longitude},${g.latitude}`).join(";"),from:3,to:5};l.src=xZ+"?"+Object.entries(p).map(([g,_])=>g+"="+_).join("&"),document.head.appendChild(l)})}})}class wZ extends gc{constructor(t){super(t);const n=!!(window.MSInputMethodContext&&document.documentMode);this._wrapper=t.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:t.controlEnabled,maxZoom:n?14:18,...t.providerOptions}),t.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper.dataset.baiduZoom=this.map.getZoom(),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new pc(this.map.getCenter())}getZoom(){return this.map.getZoom()-Sg}setCenter(t,n){this._centerReady=JS([t]).then(([r])=>{const o=new BMap.Point(r.longitude,r.latitude);this.map.panTo(o,{noAnimation:!n})})}setZoom(t,n){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(t+Sg)},{enableAnimation:n})})}}class TZ extends th{constructor(t){super(t),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;const n=this;class r extends BMap.Marker{initialize(a){return n._wrapper=super.initialize(a),n._wrapper&&(n._wrapper.style.zIndex=n._zIndex,n._originalWrapperClass=n._wrapper.getAttribute("class"),n._wrapper.setAttribute("class",n._getClass()),n._wrapper.appendChild(n._element),n.addListeners()),n._wrapper}draw(){if(n._wrapper){const a=n._wrapper.style.zIndex;super.draw(),n._wrapper.style.height="",n._wrapper.style.width="",n._wrapper.style.pointerEvents="none",n._wrapper.style.zIndex=a}else super.draw()}}this.pin=new r(new BMap.Point(0,0));const o=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(o),this.pin.setShadow(o)}addListeners(){super.addListeners(),this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(t){this._coordinateReady=JS([t]).then(([n])=>{this._negativeLngFix=n.longitude<0,this.pin.setPosition(new BMap.Point(n.longitude+(this._negativeLngFix?180:0),n.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](Og)})}setMap(t,n){this._coordinateReady.then(()=>{n&&n.getProviderMap().map.removeOverlay(this.pin),t&&t.getProviderMap().map.addOverlay(this.pin)})}setProperties(t){super.setProperties(t),this._wrapperClass=t.getClass(),this._element=t.getElement()||this._pinEl,this._zIndex=t.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?Og:""} ${this._wrapperClass}`}}const NZ="https://api.map.baidu.com/getscript";function SZ(e,t,n,{params:r={},version:o="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const i=n,a={ak:i,v:o,...r};ZS(i);const l=document.createElement("script");l.src=NZ+"?"+Object.entries(a).map(([g,_])=>g+"="+_).join("&"),l.onload=()=>e(),document.head.appendChild(l);let u="";for(let g=vZ;g<=bZ;g++){const _=2**(g-Sg+7);u+=`[data-baidu-zoom="${g}"] .${Og}{transform:translateX(-${_}px);}`}const p=document.createElement("style");p.appendChild(document.createTextNode(u)),document.head.appendChild(p)}new ks().withLoadFunction(SZ).withMapClass(wZ).withPinClass(TZ).withProviderName("Baidu").build();let XS;function OZ(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1}),this._container=document.createElement("div"),this._map=null,this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(n){this._pins.add(n),n._wrapper.style.position="absolute",this._container.appendChild(n._wrapper),this._map&&this.updatePinPosition(n)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(n){this._pins.delete(n),this._container.removeChild(n._wrapper)}updatePinPosition(n){if(!this._map)return;const r=this._map.tryLocationToPixel(n._location,Microsoft.Maps.PixelReference.control);n._wrapper.style.left=r.x+"px",n._wrapper.style.top=r.y+"px"}updatePinPositions(){this._pins.forEach(n=>this.updatePinPosition(n))}}XS=e}class AZ extends gc{constructor(t){super(t),this.wrapper=t.wrapper,this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!t.controlEnabled,disableZooming:!t.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...t.providerOptions}),this.pinOverlay=new XS(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler())}getCenter(){return new pc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new Microsoft.Maps.Location(t.latitude,t.longitude);this.map.setView({center:r}),this.pinOverlay.updatePinPositions()}setZoom(t,n){this.map.setView({zoom:Math.floor(t)}),this.pinOverlay.updatePinPositions()}}class RZ extends th{static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}constructor(t){super(t),this._map=null,this._location=new Microsoft.Maps.Location(0,0)}setCoordinate(t){this._location=new Microsoft.Maps.Location(t.latitude,t.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(t,n){n&&n.getProviderMap().pinOverlay.removePin(this),t&&t.getProviderMap().pinOverlay.addPin(this),this._map=t}}const qx="BingMapsCallback_593d7d33",$Z="https://www.bing.com/api/maps/mapcontrol";function DZ(e,t,n,{params:r={}}={}){window[qx]=()=>{OZ(),e()};const o={callback:qx,key:n,...r};EN($Z+"?"+Object.entries(o).map(([i,a])=>i+"="+a).join("&"))}new ks().withLoadFunction(DZ).withMapClass(AZ).withPinClass(RZ).withProviderName("Bing").build();class kZ extends gc{constructor(t){if(super(t),this.map=new mapboxgl.Map({container:t.wrapper,interactive:t.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...t.providerOptions}),t.controlEnabled){const n=new mapboxgl.NavigationControl({showCompass:!1});this.map.addControl(n)}this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new pc(this.map.getCenter())}getZoom(){return this.map.getZoom()+1}setCenter(t,n){const r=new mapboxgl.LngLat(t.longitude,t.latitude);this.map[n?"panTo":"setCenter"](r)}setZoom(t,n){this.map[n?"zoomTo":"setZoom"](t-1)}setZoomCenter(t,n,r){const o=new mapboxgl.LngLat(n.longitude,n.latitude);this.map[r?"easeTo":"jumpTo"]({center:o,zoom:t-1})}}class MZ extends th{constructor(t){super(t),this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper})}setCoordinate(t){this.pin.setLngLat(new mapboxgl.LngLat(t.longitude,t.latitude))}setMap(t,n){t?this.pin.addTo(t.getProviderMap().map):this.pin.remove()}}function PZ(e,t,n,{version:r="v1.13.0"}={}){const o=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new ks().withLoadFunction(PZ).withMapClass(kZ).withPinClass(MZ).withProviderName("Mapbox").build();let QS=class extends gc{constructor(e){super(e),this._initMap(e),e.controlEnabled&&this.map.zoomControl.setPosition("topright"),this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new pc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,t){const n=new L.latLng(e.latitude,e.longitude);this.map.panTo(n,{animate:t})}setZoom(e,t){this.map.setZoom(e,{animate:t})}setZoomCenter(e,t,n){const r=new L.latLng(t.latitude,t.longitude);this.map.setView(r,e,{animate:n})}_initMap(e){this.map=new L.map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions});const t=e.providerOptions,n=t.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",r=t.tileLayerOptions||{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};r.accessToken=this.constructor.apiKey,L.tileLayer(n,r).addTo(this.map)}},IZ=class extends ty{constructor(e){super(e),this.pin=new L.marker,this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(e){const t=new L.latLng(e.latitude,e.longitude);this.pin.setLatLng(t)}setMap(e,t){e?this.pin.addTo(e.getProviderMap().map):this.pin.remove()}setProperties(e){const t=e.getWidth(),n=e.getHeight(),r=e.getAnchorX(),o=e.getAnchorY();this.pin.setIcon(new L.icon({iconUrl:this._icons[e.getIcon()],iconSize:[t,n],iconAnchor:[r*t,o*n],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex())}};function LZ(e,t,n,{version:r="1.7.1"}={}){const o=`https://unpkg.com/leaflet@${r}/dist/leaflet`;QS.apiKey=n;const i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>e(),document.head.appendChild(i),document.head.appendChild(a)}const e1=new ks().withLoadFunction(LZ).withMapClass(QS).withPinClass(IZ).withProviderName("Leaflet").build(),FZ=e1.getMapClass(),jZ=e1.getPinClass();class BZ extends FZ{_initMap(t){this.map=L.mapquest.map(t.wrapper,{boxZoom:t.controlEnabled,center:new L.latLng(0,0),doubleClickZoom:t.controlEnabled,dragging:t.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:t.controlEnabled,zoomSnap:0,...t.providerOptions})}}class WZ extends jZ{}function zZ(e,t,n,{version:r="v1.3.2"}={}){const o=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new ks().withLoadFunction(zZ).withMapClass(BZ).withPinClass(WZ).withProviderName("MapQuest").build();const sh=({label:e,link:t,variant:n,size:r,borderRadius:o,className:i,fontSize:a="default"})=>re.jsx(eh,{asChild:!0,className:i,variant:n,size:r,borderRadius:o,fontSize:a,children:re.jsx(ey,{href:t??"",children:e})});sh.displayName="CTA";const t1=kr("components",{variants:{fontSize:{default:"",xs:"!text-xs",sm:"!text-sm",base:"!text-base",lg:"!text-lg",xl:"!text-xl","2xl":"!text-2xl","3xl":"!text-3xl","4xl":"!text-4xl","5xl":"!text-5xl","6xl":"!text-6xl","7xl":"!text-7xl","8xl":"!text-8xl","9xl":"!text-9xl"},weight:{default:"",100:"!font-thin",200:"!font-extralight",300:"!font-light",400:"!font-normal",500:"!font-medium",600:"!font-semibold",700:"!font-bold",800:"!font-extrabold",900:"!font-black"},color:{default:"",primary:"!text-palette-primary",secondary:"!text-palette-secondary",accent:"!text-palette-accent",text:"!text-palette-text",background:"!text-palette-background"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},level:{1:"font-heading1-fontWeight text-heading1-fontSize text-heading1-color font-heading1-fontFamily",2:"font-heading2-fontWeight text-heading2-fontSize text-heading2-color font-heading2-fontFamily",3:"font-heading3-fontWeight text-heading3-fontSize text-heading3-color font-heading3-fontFamily",4:"font-heading4-fontWeight text-heading4-fontSize text-heading4-color font-heading4-fontFamily",5:"font-heading5-fontWeight text-heading5-fontSize text-heading5-color font-heading5-fontFamily",6:"font-heading6-fontWeight text-heading6-fontSize text-heading6-color font-heading6-fontFamily"}},defaultVariants:{fontSize:"default",color:"primary",weight:"default",transform:"none"}}),lh=ge.forwardRef(({className:e,level:t=1,color:n,weight:r,transform:o,fontSize:i,...a},l)=>{const u=`h${t}`;return re.jsx(u,{id:"tag",className:t1({fontSize:i,color:n,className:e,weight:r,transform:o,level:t}),ref:l,...a,children:a.children})});lh.displayName="Heading";const n1=kr("mx-auto",{variants:{padding:{default:"px-4 py-16 md:px-8",none:"",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"},maxWidth:{default:"max-w-6xl",full:"max-w-full",xl:"max-w-4xl"}},defaultVariants:{padding:"default",maxWidth:"default"}}),Ps=ge.forwardRef(({className:e,padding:t,maxWidth:n,...r},o)=>re.jsx("div",{className:"components bg-main",children:re.jsx("div",{className:Nf(e,n1({padding:t,maxWidth:n})),ref:o,...r,children:r.children})}));Ps.displayName="Section";const HZ={address:Dr({label:"Address",filter:{types:["type.address"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},GZ=({alignment:e,padding:t,address:n,getDirectionsProvider:r})=>{const o=uo(),i=$r(o,n),a=mN(i,void 0,void 0,{provider:r});return re.jsx(Ps,{className:`flex flex-col justify-center components ${e} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:t,children:i&&re.jsx("div",{children:re.jsxs(lo,{displayName:"Address",fieldId:n.constantValueEnabled?"constant value":"address",children:[re.jsx(l9,{address:i,lines:[["line1"],["line2","city","region","postalCode"]]}),a&&re.jsx(ey,{cta:{link:a,label:"Get Directions",linkType:"URL"},target:"_blank",className:"font-bold text-palette-primary underline hover:no-underline md:px-4;"})]})})})},KZ={fields:HZ,defaultProps:{alignment:"items-start",padding:"none",getDirectionsProvider:"google",address:{field:"address",constantValue:{line1:"",city:"",region:"",postalCode:"",countryCode:""}}},label:"Address",render:e=>re.jsx(GZ,{...e})},r1=ge.forwardRef(({text:e,...t},n)=>{const r=uo();return re.jsx(lo,{displayName:"Body",fieldId:e.constantValueEnabled?"constant value":e.field,children:re.jsx(Qf,{ref:n,...t,children:$r(r,e)})})});r1.displayName="BodyText";const Zx={text:Dr({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Ma(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},UZ={label:"Body Text",fields:Zx,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"},resolveFields:async()=>{const e=await Jl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Zx,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>re.jsx(r1,{...e})},VZ={entityField:Dr({label:"Entity Field",filter:{types:["type.cta"]}}),fontSize:Ma(),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]}},YZ=({entityField:e,variant:t,className:n,fontSize:r,...o})=>{const i=uo(),a=$r(i,e);return re.jsx(lo,{displayName:"CTA",fieldId:e.constantValueEnabled?"constant value":e.field,children:re.jsx(sh,{label:a==null?void 0:a.label,link:(a==null?void 0:a.link)||"#",variant:t,className:cn(n),fontSize:r,...o})})},qZ={label:"Call to Action",fields:VZ,defaultProps:{entityField:{field:"",constantValue:{name:"Call to Action"}},variant:"primary",fontSize:"default"},render:e=>re.jsx(YZ,{...e})},ZZ="data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Material/Outline/Mail_outline'%3e%3cpath%20id='Vector'%20d='M14.4%201.95831H1.6C0.72%201.95831%200.00799999%202.67831%200.00799999%203.55831L0%2013.1583C0%2014.0383%200.72%2014.7583%201.6%2014.7583H14.4C15.28%2014.7583%2016%2014.0383%2016%2013.1583V3.55831C16%202.67831%2015.28%201.95831%2014.4%201.95831ZM14.4%2013.1583H1.6V5.15831L8%209.15831L14.4%205.15831V13.1583ZM8%207.55831L1.6%203.55831H14.4L8%207.55831Z'%20fill='%23D83B18'/%3e%3c/g%3e%3c/svg%3e",JZ=kr("list-inside font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",medium:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background",foreground:"text-palette-foreground"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default"}}),Jx={list:Dr({label:"Entity Field",filter:{types:["type.string"],allowList:["emails"],includeListsOnly:!0}}),fontSize:{label:"Font Size",type:"select",options:[{label:"Default",value:"default"},{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"medium"},{label:"Large",value:"lg"},{label:"Extra Large",value:"xl"},{label:"2xl",value:"2xl"},{label:"3xl",value:"3xl"},{label:"4xl",value:"4xl"},{label:"5xl",value:"5xl"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},includeHyperlink:{label:"Include Hyperlink",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},listLength:{type:"number",label:"List Length",min:1,max:100}},XZ=({list:e,fontSize:t,fontWeight:n,color:r,includeHyperlink:o,listLength:i})=>{const a=uo();let l=$r(a,e);return l?Array.isArray(l)||(l=[l]):l=["sample_email1@gmail.com","sample_email2@yahoo.com","sample_email3@msn.com"],re.jsx(lo,{displayName:"Email List",fieldId:e.field,children:re.jsx("ul",{className:cn("components",JZ({fontSize:t,fontWeight:n,color:r}),`${o?"text-blue-600 dark:text-blue-500 hover:underline":""}`),children:l.slice(0,Math.min(l.length,i)).map((u,p)=>re.jsxs("li",{className:"mb-2 flex items-center",children:[re.jsx("img",{className:"mr-2",src:ZZ}),re.jsx("span",{children:o?re.jsx("a",{href:u,children:u}):u})]},p))})})},QZ={label:"Emails",fields:Jx,defaultProps:{list:{field:"",constantValue:[]},includeHyperlink:!0,listLength:5},resolveFields:async()=>{const e=await Jl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Jx,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>re.jsx(XZ,{...e})},eJ=kr("flex",{variants:{direction:{row:"flex-row",column:"flex-col"},alignment:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justification:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around"},spacing:{small:"gap-2",medium:"gap-4",large:"gap-8"},wrap:{wrap:"flex-wrap",nowrap:"flex-nowrap"}},defaultVariants:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"}}),o1=ge.forwardRef(({className:e,direction:t,alignment:n,justification:r,spacing:o,renderDropZone:i,...a},l)=>re.jsx("div",{className:cn(eJ({direction:t,alignment:n,justification:r,spacing:o,className:e})),ref:l,...a,children:i({zone:"flex-container"})}));o1.displayName="FlexContainer";const tJ={direction:{label:"Direction",type:"select",options:[{value:"row",label:"Horizontal"},{value:"column",label:"Vertical"}]},alignment:{label:"Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"stretch",label:"Stretch"}]},justification:{label:"Justification",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"},{value:"spaceAround",label:"Space Around"}]},spacing:{label:"Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},wrap:{label:"Wrap",type:"select",options:[{value:"nowrap",label:"No Wrap"},{value:"wrap",label:"Wrap"}]}},nJ={label:"Flex Container",fields:tJ,defaultProps:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"},render:({direction:e,alignment:t,justification:n,spacing:r,puck:{renderDropZone:o}})=>re.jsx(o1,{renderDropZone:o,direction:e,alignment:t,justification:n,spacing:r})},rJ={coordinate:Dr({label:"Get Directions",filter:{types:["type.coordinate"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},variant:{label:"Variant",type:"radio",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:Ma(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},oJ=({variant:e,size:t,borderRadius:n,alignment:r,padding:o,coordinate:i,getDirectionsProvider:a,fontSize:l})=>{const u=uo(),p=$r(u,i);p||console.warn("yextDisplayCoordinate is not present in the stream");const g=mN(void 0,void 0,void 0,{provider:a},p);return re.jsx(Ps,{className:`flex flex-col justify-center components ${r} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:o,children:re.jsx(eh,{asChild:!0,variant:e,size:t,fontSize:l,borderRadius:n,children:re.jsx(ey,{href:g??"#",children:"Get Directions"})})})},iJ={fields:rJ,defaultProps:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default",alignment:"items-start",padding:"none",getDirectionsProvider:"google",coordinate:{field:"yextDisplayCoordinate",constantValue:{latitude:0,longitude:0}}},label:"Get Directions",render:e=>re.jsx(oJ,{...e})},aJ=[{label:"0",value:"py-0"},{label:"0.5",value:"py-0.5"},{label:"1",value:"py-1"},{label:"1.5",value:"py-1.5"},{label:"2",value:"py-2"},{label:"2.5",value:"py-2.5"},{label:"3",value:"py-3"},{label:"3.5",value:"py-3.5"},{label:"4",value:"py-4"},{label:"5",value:"py-5"},{label:"6",value:"py-6"},{label:"7",value:"py-7"},{label:"8",value:"py-8"},{label:"9",value:"py-9"},{label:"10",value:"py-10"},{label:"11",value:"py-11"},{label:"12",value:"py-12"},{label:"14",value:"py-14"},{label:"16",value:"py-16"},{label:"20",value:"py-20"},{label:"24",value:"py-24"}],sJ=kr("components",{variants:{backgroundColor:{default:"bg-grid-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"},maxContentWidth:{default:"max-w-grid-maxWidth",lg:"max-w-[1024px]",xl:"max-w-[1280px]",xxl:"max-w-[1536px]"}},defaultVariants:{backgroundColor:"default",maxContentWidth:"default"}}),lJ=kr("components flex flex-col min-h-0 min-w-0 md:grid md:grid-cols-12 mx-auto gap-y-grid-verticalSpacing",{variants:{horizontalSpacing:{small:"gap-x-2 md:gap-x-4",medium:"gap-x-8 md:gap-x-12",large:"gap-x-12 md:gap-x-16"}},defaultVariants:{horizontalSpacing:"medium"}}),cJ=kr("flex flex-col gap-y-grid-verticalSpacing",{variants:{verticalAlignment:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between"}},defaultVariants:{verticalAlignment:"start"}}),i1=ge.forwardRef(({className:e,distribution:t,columns:n,horizontalSpacing:r,verticalPadding:o,maxContentWidth:i,renderDropZone:a,backgroundColor:l,...u},p)=>re.jsx(Ps,{className:cn(sJ({maxContentWidth:i,backgroundColor:l}),o),padding:"none",children:re.jsx("div",{className:cn(lJ({horizontalSpacing:r,className:e})),ref:p,style:{gridTemplateColumns:t==="manual"?"repeat(12, 1fr)":`repeat(${n.length}, 1fr)`},...u,children:n.map(({span:g,verticalAlignment:_},C)=>re.jsx("div",{className:cn(cJ({verticalAlignment:_})),style:{gridColumn:g&&t==="manual"?`span ${Math.max(Math.min(g,12),1)}`:""},children:a({zone:`column-${C}`})},C))})}));i1.displayName="GridSection";const uJ={distribution:{type:"radio",options:[{value:"auto",label:"Auto"},{value:"manual",label:"Manual"}]},columns:{type:"array",getItemSummary:(e,t)=>`Column ${(t??0)+1}, span ${e.span?Math.max(Math.min(e.span,12),1):"auto"}`,arrayFields:{span:{label:"Span (1-12)",type:"number",min:0,max:12},verticalAlignment:{label:"Vertical Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"}]}}},verticalPadding:{label:"Vertical Padding",type:"select",options:aJ},horizontalSpacing:{label:"Horizontal Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},maxContentWidth:{label:"Maximum Content Width",type:"select",options:[{value:"default",label:"Default"},{value:"lg",label:"LG"},{value:"xl",label:"XL"},{value:"xxl",label:"2XL"}]},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},dJ={label:"Grid Section",fields:uJ,defaultProps:{distribution:"auto",columns:[{verticalAlignment:"start"},{verticalAlignment:"start"}],verticalPadding:"default",backgroundColor:"default",horizontalSpacing:"medium",maxContentWidth:"default"},render:({columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,verticalPadding:i,puck:{renderDropZone:a}})=>re.jsx(i1,{renderDropZone:a,columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,verticalPadding:i})},a1=ge.forwardRef(({text:e,...t},n)=>{const r=uo();return re.jsx(lo,{displayName:"Heading "+t.level,fieldId:e.constantValueEnabled?"constant value":e.field,children:re.jsx(lh,{ref:n,...t,children:$r(r,e)})})});a1.displayName="HeadingText";const Xx={text:Dr({label:"Entity Field",filter:{types:["type.string"]}}),level:{type:"number",label:"Heading Level",min:1,max:6},fontSize:Ma(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"},{label:"Foreground",value:"foreground"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}},fJ={label:"Heading Text",fields:Xx,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},content:"Heading",level:2,fontSize:"default",weight:"default",color:"default",transform:"none"},resolveFields:async e=>{const t=await Jl({fontCssVariable:`--fontFamily-heading${e.props.level}-fontFamily`});return{...Xx,weight:{label:"Font Weight",type:"select",options:t}}},render:e=>re.jsx(a1,{...e})},hJ={hours:Dr({label:"Hours",filter:{types:["type.hours"]}}),startOfWeek:{label:"Start of the week",type:"radio",options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"},{label:"Today",value:"today"}]},collapseDays:{label:"Collapse days",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},showAdditionalHoursText:{label:"Show additional hours text",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},pJ=({hours:e,startOfWeek:t,collapseDays:n,showAdditionalHoursText:r,alignment:o,padding:i})=>{const a=uo(),l=$r(a,e),{additionalHoursText:u}=a;return re.jsx(Ps,{className:`flex flex-col justify-center components ${o} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:i,children:re.jsxs("div",{children:[l&&re.jsx(lo,{displayName:"Hours",fieldId:"hours",children:re.jsx(yZ,{hours:l,startOfWeek:t,collapseDays:n})}),u&&r&&re.jsx(lo,{displayName:"Hours Text",fieldId:"additionalHoursText",children:re.jsx("div",{className:"mt-4",children:u})})]})})},gJ={fields:hJ,defaultProps:{hours:{field:"hours",constantValue:{}},startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0,alignment:"items-center",padding:"none"},label:"Hours Table",render:e=>re.jsx(pJ,{...e})},mJ={hours:Dr({label:"Hours",filter:{types:["type.hours"]}}),showCurrentStatus:{type:"radio",label:"Show Current Status",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},timeFormat:{type:"select",label:"Time Format",options:[{label:"12-hour",value:"12h"},{label:"24-hour",value:"24h"}]},showDayNames:{type:"radio",label:"Show Day Names",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},dayOfWeekFormat:{type:"select",label:"Day of Week Format",options:[{label:"Short",value:"short"},{label:"Long",value:"long"}]}},yJ=({hours:e,className:t,showCurrentStatus:n,timeFormat:r,showDayNames:o,dayOfWeekFormat:i})=>{const a=uo(),l=$r(a,e);return l?re.jsx(lo,{displayName:"Hours",fieldId:e.field,children:re.jsx(hZ,{hours:l,className:cn("components font-semibold mb-2 font-body-fontFamily",t),currentTemplate:n?void 0:()=>re.jsx(re.Fragment,{}),separatorTemplate:n?void 0:()=>re.jsx(re.Fragment,{}),dayOfWeekTemplate:o?void 0:()=>re.jsx(re.Fragment,{}),dayOptions:{weekday:i},timeOptions:{hour12:r==="12h"},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}):null},vJ={label:"Hours Status",fields:mJ,defaultProps:{hours:{field:"hours",constantValue:{}},className:"",showCurrentStatus:!0,timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long"},render:e=>re.jsx(yJ,{...e})},bJ="https://placehold.co/640x360",s1=kr("",{variants:{size:{small:"max-w-xs",medium:"max-w-md",large:"max-w-xl",full:"w-full"},aspectRatio:{auto:"aspect-auto",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]"},rounded:{none:"",small:"rounded-sm",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"medium",aspectRatio:"auto",rounded:null}}),_J={image:Dr({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},xJ=({image:e,size:t,aspectRatio:n,rounded:r})=>{const o=uo(),i=$r(o,e);return i?re.jsx(lo,{displayName:"Image",fieldId:e.field,children:re.jsx("div",{className:cn(s1({size:t,aspectRatio:n,rounded:r}),"overflow-hidden"),children:re.jsx(bN,{image:i,className:"w-full h-full object-cover"})})}):null},EJ={label:"Image",fields:_J,defaultProps:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:bJ},constantValueEnabled:!0},size:"medium",aspectRatio:"auto",rounded:"none"},render:e=>re.jsx(xJ,{...e})},CJ=kr("components flex gap-2 items-center text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background",foreground:"text-palette-foreground"}},defaultVariants:{fontWeight:"default",color:"default"}}),wJ=(e,t="domestic")=>{const r=(""+e).replace(/\D/g,"").match(/^(?:\+?(\d{1,3}))?(\d{3})(\d{3})(\d{4})$/);if(r){const o=r[1]?`+${r[1]} `:"";return t==="international"?`${o}(${r[2]}) ${r[3]}-${r[4]}`:`(${r[2]}) ${r[3]}-${r[4]}`}return e},Qx={phone:Dr({label:"Entity Field",filter:{types:["type.phone"]}}),format:{label:"Format",type:"radio",options:[{label:"Domestic",value:"domestic"},{label:"International",value:"international"}]},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},TJ=({phone:e,format:t,fontWeight:n,color:r})=>{const o=uo(),i=$r(o,e);if(i)return re.jsx(lo,{displayName:"Phone",fieldId:e.field,children:re.jsxs("p",{className:CJ({fontWeight:n,color:r}),children:[re.jsx(A$,{className:"w-4 h-4"}),wJ(i,t)]})})},NJ={label:"Phone",fields:Qx,defaultProps:{textSize:16,phone:{field:"mainPhone",constantValue:""}},resolveFields:async()=>{const e=await Jl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Qx,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>re.jsx(TJ,{...e})},SJ="https://placehold.co/640x360",OJ={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},title:{type:"object",label:"Title",objectFields:{text:Dr({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Ma(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"},{label:"Foreground",value:"foreground"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},description:{type:"object",label:"Description",objectFields:{text:Dr({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Ma(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"},{label:"Foreground",value:"foreground"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:Dr({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:Dr({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:Ma()}}},AJ=({orientation:e,title:t,description:n,image:r,cta:o})=>{const i=uo(),a=$r(i,r.image),l=$r(i,o.entityField);return a?re.jsx(Ps,{className:"components",children:re.jsxs("div",{className:cn("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[a&&re.jsx(lo,{displayName:"Image",fieldId:r.image.field,children:re.jsx("div",{className:cn(s1({size:r.size,rounded:r.rounded,aspectRatio:r.aspectRatio}),"overflow-hidden"),children:re.jsx(bN,{image:a,className:"w-full h-full object-cover"})})}),re.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&re.jsx(lh,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:$r(i,t.text)}),(n==null?void 0:n.text)&&re.jsx(Qf,{fontSize:n.fontSize,textTransform:n.transform,color:n.color,children:$r(i,n.text)}),l&&re.jsx(sh,{variant:o.variant,label:l.name,link:l.link??"#",fontSize:o.fontSize})]})]})}):null},RJ={label:"Promo",fields:OJ,defaultProps:{orientation:"left",title:{text:{field:"",constantValue:"Title",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},description:{text:{field:"",constantValue:"Description",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:SJ},constantValueEnabled:!0},size:"medium",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>re.jsx(AJ,{...e})},$J=kr("list-disc components list-inside text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-palette-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"}},defaultVariants:{padding:"none",fontWeight:"default",color:"default",textTransform:"none"}}),eE={list:Dr({label:"Entity Field",filter:{types:["type.string"],includeListsOnly:!0}}),padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},DJ=({list:e,padding:t,fontWeight:n,color:r,textTransform:o})=>{const i=uo();let a=$r(i,e);return a?Array.isArray(a)||(a=[a]):a=["Sample text 1","Sample text 2","Sample text 3"],re.jsx(lo,{displayName:"Text List",fieldId:e.field,children:re.jsx("ul",{className:$J({padding:t,fontWeight:n,color:r,textTransform:o}),children:a.map((l,u)=>re.jsx("li",{className:"mb-2",children:l},u))})})},kJ={label:"Text List",fields:eE,defaultProps:{padding:"none",list:{field:"",constantValue:[]}},resolveFields:async()=>{const e=await Jl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...eE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>re.jsx(DJ,{...e})};exports.AddressComponent=KZ;exports.Body=Qf;exports.BodyTextComponent=UZ;exports.Button=eh;exports.CTA=sh;exports.CTAWrapperComponent=qZ;exports.DocumentContext=Ag;exports.Editor=cV;exports.EmailsComponent=QZ;exports.EntityField=lo;exports.FlexContainerComponent=nJ;exports.FontSizeSelector=Ma;exports.GetDirectionsComponent=iJ;exports.GridSectionComponent=dJ;exports.Heading=lh;exports.HeadingTextComponent=fJ;exports.HoursCardComponent=gJ;exports.HoursStatusComponent=vJ;exports.ImageWrapperComponent=EJ;exports.Jl=$u;exports.NumberFieldWithDefaultOption=ZV;exports.PhoneComponent=NJ;exports.PromoComponent=RJ;exports.Section=Ps;exports.TailwindConfigContext=Rg;exports.TextListComponent=kJ;exports.VisualEditorProvider=FO;exports.YextEntityFieldSelector=Dr;exports.Zl=yN;exports.applyTheme=Q1;exports.bodyVariants=pN;exports.buttonVariants=gN;exports.constructFontSelectOptions=q1;exports.defaultFonts=$g;exports.getFontWeightOptions=X1;exports.getFontWeightOverrideOptions=Jl;exports.headingVariants=t1;exports.lt=an;exports.resolveVisualEditorData=eO;exports.resolveYextEntityField=$r;exports.sectionVariants=n1;exports.themeResolver=nO;exports.useDocument=uo;exports.useEntityFields=sE;exports.usePlatformBridgeDocument=G1;exports.usePlatformBridgeEntityFields=K1;exports.useTailwindConfig=lE;exports.yextCn=cn;
|